« first day (1862 days earlier)      last day (3005 days later) » 

5:42 AM
@MartinSmith Perhaps they'll finally do something about the root cause now it has hurt them as well as us ;)
 
 
3 hours later…
8:28 AM
Hello. I'm using this analysis query , Which I think is pretty popular (And i'll be happy to be corrected , if there's a better one) but my question is : Is it possible to add the actual object name to the query ? I've already seen that name can be found , But In my SP above , there is no dm_exec_procedure_stats . How can I include object name into my query ?
Visualization :
 
8:42 AM
@RoyiNamir sys.dm_exec_sql_text has objectid, which you can use to derive the name.
 
Oh. thanks:-)
BTW , I also found this huge query which does pretty intensive analysis : dl.dropboxusercontent.com/u/13748067/…
 
9:26 AM
@RoyiNamir I'm not entirely sure why, but I found the dbid from dm_exec_plan_attributes to be more useful than the one in dm_exec_sql_text
 
What do you mean "more useful" , isn't it the same value ?
 
@RoyiNamir Depends on your version of SQL Server
dm_exec_sql_text will return NULL in <= 2008R2 for adhoc and prepared statements. Whereas plan_attributes would return the database in which the statement was compiled and executed
Depends if that is of importance to you or not
It may still be the case in some scenarios (I never changed this once upgrading to 2012), so you could always check both and let us know
 
Thank you for the info.( I didn't know that)
 
10:28 AM
Seen on the interwebs today ...
The one true #JavaScript exception handler. ;) https://t.co/Zwoi3VlluD
 
 
2 hours later…
12:39 PM
I'm sure my physical and mental health will be harmonized by the time the week is over.
pranarom.com/scientific-aromatherapy This whole building smells of it
 
@TomV are you on some healing week?
 
That's the company I'm sitting all week, customer
there are dispensers of that stuff all through this building
 
@TomV those I usually disable, without asking for permission
well, not scientific aromatherapy dispensers but those common smelly things you plug into the electricity socket
I tend to get headache/nausea from them
 
@TomV I suppose showing up with a gas mask would be considered rude? ;)
 
@ypercubeᵀᴹ I could have gotten away with that yesterday (with carnival) :)
 
12:58 PM
it's a bit early for carnival, isn't it?
Oh, I forgot that the Easters (Catholic vs Orthodox) are 5 weeks apart apart this year.
 
It's "fat tuesday" today (at least that's what it's called in Sweden). Translated to french, that's "mardi gras".
Personally, I think the day signifies the point where people break their new-year's resolutions, stop going to the gym and start eating buns with whipped cream.
 
@DanielHutmacher Yeah, I'm reading about it.
Seems like it's the last day before "Lent" starts.
In the Greek Orthodx tradition, the Lent starts two days earlier, in "Clean Monday".
But this year, the Orthodox Easter is 5 weeks after the Catholic, so that Monday is also 5 weeks later, on 14th March.
 
1:14 PM
@DanielHutmacher you must know that first-hand, as I've just learnt
 
 
1 hour later…
2:19 PM
@dezso not very religious myself. I just eat and try to work it off at my night job as a cycling instructor. :)
 
@DanielHutmacher I meant the last bit - you must see people behaving like described above :)
 
@dezso Indeed. :D
 
2:58 PM
Scenario - I've got a database with a couple of very crappy, poorly designed tables. We wrapped these crappy tables up in a couple of views that make a lot more sense logically. Is attempting to insert directly to the views rather than the crappy underlying tables pure insanity?
Looking at the create-view statements I think it might be. They include table functions and at least one of them includes calls to sql_variant_property.
 
in nomine patris, et filii, et spiritus sancti
 
you must need more KFC, you're speaking in tongues again.
 
Chicken tongues are best served with 11 herbs and spices
 
yes, yes, they are!
 
How many chicken tongues to make a meal?
 
3:05 PM
@mikeTheLiar European or African chicken?
 
What? Well I don't know thAAAGGGGHHHHHHH
 
3:18 PM
@dezso Maybe a metal chicken?
 
@DanielHutmacher is that like an Electric Monk?
 
@MaxVernon shoot off.
 
Going to read later. Gotta go!
 
Oh great. VS crashes when I attempt to add an ADO.NET destination to my data flow task. Joy of joys.
 
3:45 PM
Does anyone know of any performance comparisons for SQL Server 2016 on temporal tables vs rolling your own trigger based solution?
 
@MarkSinkinson haven't seen one. Hopefully performance is good, because I've played with temporal tables and it's a really nice feature
 
@Lamak might look into that myself then. We currently have a trigger based auditing solution (dating from when we ran 2005) and I'm wondering if we'd benefit from running a temporal solution (space, performance, querying ability) in SQL Server 2016
 
@MarkSinkinson please do and post the results :-)
 
4:22 PM
0
Q: search pgadmin for column

devdropper87I'm a front end dev and this is my first time doing serious database work. I have json sent to the client that looks like this: prop[0].event.history = 'foo'; //can also be 'bar' I wanted to inspect the database to specifically find values of foo or bar. how can I search pgAdminIII to find th...

interesting
 
4:53 PM
Searching for solution to SSIS problem. Find answer on Stack Overflow by @billinkc. Answer starts: This is not as straight forward as it ought to be. That or I need to go back to SSIS class. hopes_deleted.png
 
5:11 PM
I'm guessing it's parameterization of an ADO.NET source
 
5:27 PM
1
A: How to Add the Result Set from a T-SQL Statement to a Data Flow?

billinkcThis is not as straight forward as it ought to be. That or I need to go back to SSIS class. The OLE DB Command component can't add new rows to the dataflow, as it's a synchronous component. It also cannot add new columns to the data flow. That's the first thing that was non-intuitive. So you'l...

 
Is this accurate? You can invalidate an execution plan for a statement within a procedure, without invalidating the plan for the procedure?
 
Oh, yeah, that too. The client I'm on does the same thing - except they used a derived column to generate the placeholder versus faking it in the query
 
6:17 PM
@JamesLupolt Are you asking if statement-level recompilation exists? o.O
 
Is a stored procedure plan a thing? I thought that after OPTION (RECOMPILE) was introduced, a stored procedure plan became merely a collection of the plans of the SP's individual statements. (Or perhaps it's been so always, we just had little control over the individual parts.) Anyway, is there more to it than that?
 
@AndriyM It is, but there's still a top-level container object.
 
@PaulWhite Representing the SP itself?
 
@AndriyM Pretty much, or function, trigger, or whatever.
It's complicated.
 
@PaulWhite Heh, I see what you mean. It seems pretty obvious now.
 
6:25 PM
I see now. Makes sense, too. When it's compiled after the first run, I guess it's easier to keep track of the fact by using a single reference point.
 
Oddly I could have found the answer to my question in one of my own presentations. I don't know why that post confused me.
 
@JamesLupolt Happens to us all :)
 
6:52 PM
Vote to migrate please
-2
Q: Vertica Licensing Audit

tcj123Does anyone know what happens if a HP Vertica audit reveals higher than licensed usage? (Not by a whole lot, just a little -- Was contacted by HP just wondering what the fall out may be). Not really experienced with here, just looking for any past experiences, any guidance here?

 
@Kermit I would think this is off topic. Licencing.
 
Yeah we don't want that.
 
7:14 PM
here we go again
@KrisGruttemeyer Then by that definition an index rebuild is modifying the underlying index structure. Stand by your down vote and I will stand by my answer. A fill factor change does not take much longer than a rebuild. Three fill factor changes and a sort - worth a try in my book. — Frisbee 2 hours ago
 
Here's something that I think should be relatively easy but I have a sinking feeling that it's not going to be.
SSIS, Excel Spreadsheet. Row/Column headers across top row / down left column.
What I want is to get the Row header, Column header, and value of the cell at that intersection for all possible intersections
 
@mikeTheLiar Define row header?
 
@TomV that value in the column A corresponding to that row.
 
Yes but what is special about it, I mean in the destination it'll be also rows with column names I suppose, what is the expected output or end result?
 
So for cell F8 - I want the values from F1, A8, and F8
@TomV it won't.
It'll be X Coordinate, Y Coordinate, Value.
So each cell tuple (three-ple?) will be its own record in the destination
 
7:28 PM
Sounds like a pivot operation
 
pivot?
 
LOL
 
@bluefeet HAHA, even with integration services?
 
lol
 
I, for one, Welcome our new SSIS overlord
/JK though, as usual
 
7:34 PM
@TomV I'd leave that one to @billinkc
 
If you have enterprise version, you probably need to consider partition switching. This way you will be able to plug-in big portions of data in milliseconds. Just prepare empty table with exactly same structure, use tablock hint for insert and then switch it into the production table. If you ran into issues you may want to check this link: sqlfool.com/2009/10/partitioning-tricksyahor 1 min ago
^ why I hate answers in comments, exhibit #1
 
Oh wait
 
@PaulWhite Let's hope this one becomes obsolete then
@yahor That looks useful enough to be an answer given some padding — Tom V 22 secs ago
 
At least then I can give it the nuclear downvote it deserves.
 
7:38 PM
There is no evidence in the question whatsoever to make me think partition swapping is going to help the OP
 
Plan with an obviously stupid and expensive Eager Index Spool - you need partitioning!!!1!
 
I was thinking the same, but still
 
Now maybe I'm wrong and it will save his life. Buttttttt. Nothing in that question suggests that.
 
The whole question is turning into a trainwreck - primarily because it was so unclear to begin with. Hence random guessing.
If I had seen it earlier I would have put it on hold until a plan & DDL turned up.
 
The guessers are quicker than the VtC'ers very often
 
7:41 PM
Yes, and given time, someone (probably David or wBob at this stage) will add a good answer, which will attract many up votes and justice will be done.
 
Or somehow a guesser is right, the answer gets accepted and the question abandoned
 
Almost the worst possible outcome.
 
@yahor nothing in the OP's question leads me to believe that partition switching will help him. He needs to find a way to eliminate that spool that's costing so much however without more query info may be hard to say how. — Zane 52 secs ago
 
@Zane That is valid for frisbee's answer too :)
 
That spool is butts.
@TomV Which is also butts.
Frisbee does that a ton.
 
7:44 PM
I don't blame answers much when the question is so vague.
 
And seems to be at -2 +2 since my comment on that mess, so finally downvoted (I didn't want to downvote right after the comment because that gets his panties in a bunch)
 
"This reminds me of some anecdotal evidence I'm pulling out of my ass. Now let's argue about why you're all questioning my random assertions."
 
Except this answer, which is uniformly terrible everywhere at all times most likely.
@TomV The two up votes on that answer, and the question puzzle me.
 
@Zane Random ass ertions.
 
At least it has some basis in reality.
 
7:47 PM
@Zane Ha reminds me of some guy. After a support call with Microsoft the trace flag disabling lock escalation fixes an issue, he's now suggesting it as a best practice saying "it was recommended by microsoft and in that example it cut execution time by 70%"
 
@TomV /shudder
 
@TomV Oh Jesus.
 
Not kidding (for once)
 
I suspect most of us have stories like that.
 
@mikeTheLiar I'm about to sign off, are you good to go?
 
8:00 PM
@TomV I'm playing around with it, don't hang around on my account.
 
I wondet how 15K per 5 min is less than 1 row per second.
Weird math
 
@ypercubeᵀᴹ Perhaps his database is moving at an appreciable fraction of the speed of light.
3
 
What I don't understand is that he gets all those downvotes but still thinks the problem is with the voters
 
@TomV Who, Blam Frisbee?
 
@bluefeet I don't think I understand @mikeTheLiar's problem well enough to begin an SSIS answer but I strongly suspect it starts with "I'd preprocess the file with C#"
 
8:12 PM
@PaulWhite Who else? in response to @ypercubeᵀᴹ his comment
 
@billinkc hah! That's what I'm starting to think. Hold on, I've got pictures now.
 
Yes! I r gud wit pickchures
 
Row         Column  Value
=========================
3/31/2005   10740   Null
3/31/2005   10900   Null
3/31/2005   11460   Null
3/31/2005   12060   .66
6/30/2005   10740   .016
6/30/2005   10900   6.35
6/30/2005   11460   Null
6/30/2005   12060   2.86
So for the first two rows, that's the desired output
 
8:16 PM
@TomV I don't see a response to yc's comment?
B
i
m
l
^ Unpivot Biml.
 
Hmm, lost in translation, ypercube questioned the math, I questioned other reasoning from the same guy
 
@TomV Oh OK. But to be fair (which I try to be) Frisbee's answer was a 'reasonable guess' at the time it was posted.
We all know he doesn't always react positively to criticism in comments, yet...
 
@PaulWhite Don't make me reach for photoshop
 
@billinkc Ha. Ok. Anything but that!
 
I suspect Adobe says the same thing
 
8:47 PM
@TomV I like your following take on normalization, particularly because you emphasize the importance of the meaning and nature that the things hold in their own specific context (and this is my interpretation of what Codd prescribed). This approach is commonly much more practical than the use of abstractions, as you rightly point out.
4
A: Is this in 1NF?

Tom VI think you need to reconsider whether the payment for the dates is done on the hire (or rather the transaction) or the customer. When thinking about normalization you need to think in terms of properties of an entity rather than something abstract so I want you to think if day in and out, and t...

 
8:58 PM
@zane And a lot of the detail was added after my answer. If you will note in the comments I was the first to ask if the query itself was slow. — Frisbee 31 secs ago
 
I really don't know what you're hoping to get out of that discussion.
 
@billinkc this wins. I give up. This is a one-off task anyway, so it doesn't need to be pretty, just functional.
 
9:29 PM
@PaulWhite good point.
 
9:39 PM
 
Hey all, does this answer look legit or look like spam to you?
 
10:02 PM
@Phrancis The latter.
 
OK thanks for deleting it
 
10:27 PM
That's a ton of drunk rubes @swasheck
 
10:59 PM
Is there a reason to use sys.database_files over sys.master_files? Especially if I'm about to write a cursor to pull the size/model/etc data for all the databases?
 
11:29 PM
@Zane that would be if this was in Charlotte. We're not rubes.
@bluefeet there's no straightforward way to share pictures on mobile chat
 
11:55 PM
@swasheck what?
 

« first day (1862 days earlier)      last day (3005 days later) »