« first day (1732 days earlier)      last day (3138 days later) » 
00:00 - 21:0021:00 - 22:00

12:32 AM
0
Q: canned responses for "leave a comment"

mpagsee e.g.: How do I change the schema of PostgreSQL to work into R? I clearly stated in my "answer" that I intended to leave it as a comment to their post, but could not because of SE's minimum rep (50) to comment. Then I was chastised by a senior user for not instead posting as a comment. This ...

 
 
6 hours later…
6:08 AM
@TomV And yet the question has three up-votes and zero down-votes
Or at least it did.
 
 
4 hours later…
10:17 AM
So it's the devocalypse here today
Our systems team installed a trial build of Windows 2016 on all the non-production hypervisors (Hyper-V). It expired and now reboots every couple hours
 
0
A: Problem with EXEC MyLinkedServer...sp_executesql within transaction

user5393100That shouldn't be an issue any more with the latest SPs.

Really?
An accepted answer which is no more than a short comment.
 
10:33 AM
@Colin'tHart Saw that earlier. I presumed it accurately reflected the OP's experience. The question was a year old. Seems at least plausible that the problem was fixed in a Service Pack. You're right though.
@JamesLupolt Is it too soon to laugh?
Anything you can add to this would be helpful for future visitors. Do you have direct experience of this? Which Service Pack solved the issue for you? As it stands, it offers little lasting value to the site, so we may well end up deleting this question (as a side effect, you would lose the 15 rep for an accepted answer). — Paul White ♦ 31 secs ago
Oh ha ha:
0
A: Blocked sessions waiting with PAGELATCH_* wait types?

Paul White I previously assumed that SQL Server would only report a blocking session in the blocking_session_id column, if the blocked sessions were waiting for a logical lock and not anything else such as a PAGELATCH_*. You are using Adam Machanic's sp_WhoIsActive procedure, not a built-in SQL Server ...

Accepted without an up-vote. There should be a special badge for that.
 
@PaulWhite Aforementioned SP answer would also have won that badge :-)
 
Oh, there's Tenacious and Unsung Hero.
Six people have Unsung Hero. That's quite shocking.
@Colin'tHart Indeed. I wonder what causes this. Low rep users perhaps.
But that doesn't apply in either case here. Both have > 15 rep.
 
Yeah, that one cracked me up!
 
@TomV Extract from a standard email. Not sure why they would post it.
 
11:00 AM
146
Q: About your f***ing website

Jeff AtwoodPresented for your enjoyment-slash-amusement. Email received by team@stackoverflow.com from Name Jesus Christ Almighty, what a f***ing mess of a website. I'm trying to post a question. Just the one, you know, f***ing question. So I sign up for an ID and I'm sent an email that doesn't real...

2
Ha ha ha. Everyone's probably seen that but it was new to me.
 
@PaulWhite it should be taught in those 'How to customercare' courses
 
Agreed :)
 
 
1 hour later…
12:19 PM
@PaulWhite New to me too, thanks!
 
12:34 PM
0
Q: Alternative query to avoid count(distinct)

Gabi Sarbui have a performance issue with my query and i need to rewrite it to have my result in better time. If you can help me with an idea? My query is the following: select dc.Country, COUNT(DISTINCT fvcd.IdAppInstance) AS Visitors FROM dbo.Fact_VisitorsCountryDetails fvcd INNER JOI...

@PaulWhite what index would be your choice for the above query?
(IdPartnerid, IdDate) INCLUDE (IdAppInstance) or (IdPartnerid, IdCountry, IdDate) INCLUDE (IdAppInstance) ?
or something else?
(assuming you can't test. Just pick an index to add)
 
@ypercube Very much depends on row counts/distribution and whether Country is unique.
I'm not going to guess, sorry. Too many variables.
I will say that 2008 R2 is the wrong version for DW queries though :)
I almost got interested in that question when I saw DDL, but it's just FKs, some invalid. No indexes or stats.
 
Yeah, I agree.
 
@ypercube The former of those two though. Probably.
 
My interest was because I've tried similar queries in the past and indexing is not obvious.
 
Oh look I did guess.
@ypercube Yes, exactly the cause of my reluctance.
 
12:41 PM
   SELECT
       c,
       COUNT(DISTINCT p)
   FROM
       t
   WHERE
       a = @a
       AND b BETWEEN @start AND @end
   GROUP BY
       c ;
(a, b) INCLUDE (p)
(a, c, b) INCLUDE (p)
(a, b, c) INCLUDE (p)
or maybe
(a, c, p, b)
 
Maybe (a, c, b) if it can avoid a sort. (a, b, c) wouldn't be useful because any ordering on c is lost due to the inequality on b.
 
@PaulWhite Nope
Never too soon
 
3 hours ago, by James Lupolt
Our systems team installed a trial build of Windows 2016 on all the non-production hypervisors (Hyper-V). It expired and now reboots every couple hours
LOLOLOLOL
4
 
1:34 PM
That's a whole lotta love
 
1:45 PM
Anyne with vote to close privilege at SO, please do:
I'm voting to close this question as off-topic because it has been cross posted at DBA.SE as well ( dba.stackexchange.com/questions/115990/… ), where it has received 6 answers (in fact the 3 answers here are duplicated there (!) and there are 3 more.) I suggest we just close and delete this one. — ypercube 48 secs ago
...
And another cross posted question. This is at DBA with 0 answers here and 4 answers at SO:
I'm voting to close this question as off-topic because it has been cross posted at SO: stackoverflow.com/questions/32837278/… I suggest we just close and delete this. — ypercube 1 min ago
 
0
Q: Huge mismatch in reported index size and buffers from execution plan

dezsoWe have a query like SELECT COUNT(1) FROM article JOIN reservation ON a_id = r_article_id WHERE r_last_modified < now() - '8 weeks'::interval AND r_group_id = 1 AND r_status = 'OPEN'; As it runs into a timeout (after 10 minutes) more often than not, I decided to investigate the ...

it's my 12th question on the site
 
2:00 PM
@dezso wouldn't an index on (group_id, status, last_modified) be better for this query?
 
@ypercube Page not found
 
@AndriyM bluefeet took care of it
 
@ypercube I was thinking about that, too - could possibly help, but the main issue is here the unexplainable numbers :)
 
@dezso can you find the numbers for this: select count(*) from reservation where r_status = 'OPEN';
and this: select count(*) from reservation where r_last_modified < now() - '8 weeks'::interval AND r_group_id = 1 AND r_status = 'OPEN';
 
I've added a small remark to the end
I see the same botched index scan after removing the join
 
2:06 PM
My idea is that if the number of rows that satisfy WHERE (r_status <> ALL (ARRAY['FULFILLED', 'CLOSED', 'CANCELED'])); is high compared to the number of rows that satisfy the condition of the query
that may explain something.
 
the OPEN count is 171793, the other one is reported in the explain output: 20605
so, basically everything that is not closed is OPEN
 
So, the index can find these 170K rows but then the rest of the condition (about the group_id and last_modified) has to be checked against the table.
I'm not really good at reading postgres plans
 
ehrm....ok?
-9
Q: Why does SQL exist?

TrudleRI'm wondering, why this language even exists, if there is no database that fully supports it? I always thought that MySQL for instance would fully embrace it, but MySQL doesn't support "CHECK" for instance (constraint). There is Java that was developed to create applications that run in the JVM...

 
@Lamak no OK (it's gone, fortunately)
 
I was about to comment that "I agree and SQL should be exterminated" :(
I wonder if people understand what I was asking. I don't think that you can compare a "programming" language to a language like english. Think about if Oracle would introduce Lambdas for Java, but you cannot use it, because it's not supported? Everyone would go wild. But in SQL it looks like a different story. It's a "concept" somehow that supports all kinds of mathematical operations. — TrudleR 27 secs ago
 
2:26 PM
and yes the mysql 5.6 docs state that READ COMMITTED is esentially "consistent (nonlocking) reads", but that is obviously a lie as consistency would either require a temporal database storage engine or locking. I think what mysql means to say is that it locks less. But that's not what they say so it is a lie. — user3338098 4 mins ago
 
@dezso I can't parse the intention of the comment or the answer.
 
Oh god, I have to use MySQL for something. I never signed up for this!!! This is the Terribaddest thing that's ever happened to me!
 
2:49 PM
@philipxy I've voted to close that SO question (as there are more answers here). — ypercube 1 hour ago
@ypercube Did you mean "here" rather than "there"? ^^^
 
@PaulWhite yes, I did.
 
Good 'cos that's what you said ;)
 
mod magic?
 
Take me down to the DBA city where the buffers aren't clean and the plans aren't pretty
6
 
it would rhyme better with "are". But get a star.
 
3:00 PM
Have two.
@dezso Well it's not actual magic...
 
@PaulWhite but mod?
 
@dezso Sure.
 
@swasheck to the tune of Molly Malone
In the DBA city, where the plans are so pretty, [...]
 
@ypercube but that wouldnt be reality :)
0
Q: Help with query

ManoharI have following data, I am trying to get the no of days when the project stayed in a particular status. like from below raw data, I need to be able to get the . Can I get some pointers on how I can achieve this? Thanks Expected results **ID** **STATUS** **ENTRY_DATE** **EXIT_DATE** 541c4c...

time to terminate
 
@PaulWhite - any chance you can clear up this lone comment? I believe it was a response to srutsky asking to clean up the other comments.
Done. Thanks again. — ijustlovemath 13 hours ago
 
3:09 PM
@MaxVernon Sure. Did you run out of flags?
 
hmmm. good point. I'll flag it.
I see you removed it.
thanks
 
The mod is faster than the flag, as they say.
 
will use the flag next time, if that's the recommended method.
 
I don't really care either way. I guess so. Was wondering mainly if you had run out of flags for the day.
Proper answer: yes flags are the way. Won't get missed.
 
@swasheck what in the hell is that about anyway! VtC as unclear.
@PaulWhite lol, no, I haven't ran out of flags. Thanks again!
 
3:13 PM
@MaxVernon People can run out of flags, if you're wondering what I'm on about.
 
@PaulWhite I figured there was some kind of limit; I've just never hit it.
 
@MaxVernon they want the:
> I need to be able to get the .
 
@dezso exactly. They are trying to get the "point". Just like me.
 
The heart-warming thing about that lone comment was that there were 11 comments preceding it that had been self-deleted by the users involved once the discussion was complete.
 
@PaulWhite yah, I saw the other comments prior to them deleting them, and thought surely by today the last one will be deleted. But, alas, no.
 
3:15 PM
Ah.
 
questions/answers are so much cleaner/clearer without a comment trail.
I love going for the obvious:
Without further details of what their code is actually doing its pretty hard to say. Why not ask them? — Max Vernon 14 secs ago
 
@PaulWhite of all of your blog posts that i've loved reading, this one is the one to which i refer most often.
thanks for your work/help
 
@swasheck You're weird :)
 
why?
 
We're all weird, aren't we? We're DBAs
5
 
3:20 PM
@PaulWhite (also, coming from you, i'll take that as a compliment)
@Phil i thought we were DBAs because we're masochists
 
@swasheck Correct.
@billinkc Did you ever enlighten Erik on that?
 
Did you see that database film in the cinema? I hear the sequel is coming out soon....
(I'll get my coat)
 
Oh goodness me. Phil!!!
 
@Phil you should have seen the look my wife gave me last night when I was trying to explain the bit-shifting in hexadecimal.
 
And they say romance is dead.
 
3:27 PM
@MaxVernon well i know what didn't happen last night
3
 
@swasheck lol.
 
not LOL
 
nope!
 
Hides
 
Shhhh, on a phone interview
 
3:28 PM
@billinkc L
 
@billinkc Tell them my joke. Hire them if they get it
 
It's like this crazy ping pong of notifications. This computer, my desktop and the second vm running there.
 
@billinkc let me help you with that
 
@PaulWhite Oh please don't delete our lengthy threads. How are we going to get the fancy ("tidying up" something) hat in December?
 
@billinkc my god ... it's full of dings
 
3:29 PM
@billinkc It is annoying I'm sure.
 
@billinkc I mean, I don't really know if it's "helping"
 
@billinkc must be really irritating
 
@billinkc but I'm willing to try
 
@billinkc looks like you've summoned the trolls
@billinkc we're here for you buddy
 
@ypercube I'll take a (summer) holiday :)
 
3:30 PM
Three billy goats gruff
 
I like this one: "A DBA walks into a bar and asks for a job.
When the woman behind the bar finds out he's a DBA she says:
"I can't have a DBA in here. All of you are weird. The last one claimed he could reorganize tables, improve our view, and was used to working with servers. But halfway through the interview he started claiming that my form wasn't normal and I had to kick him out.""
6
 
ha ha ha
 
LOLOL.
2
@Phil I'm stealing that, hope you don't mind
 
The star section should be renamed to LOL section today ;)
 
stop using MySQL
 
3:44 PM
@MaxVernon yeah. the query is another example of wrong use of GROUP BY.
 
@MaxVernon I stole it from the internets
 
@Phil fantastic. For a moment, I thought you were legitimately funny.
@ypercube I so love it when people use SELECT DISTINCT for every query. We have a Data Architect that writes queries like that all the time.
be back in 15
 
@MaxVernon he's just being thorough
 
@MaxVernon use SELECT ALL everywhere to be fancy ;)
 
@MaxVernon I am funny. Just not in the way you expect
@ypercube I just cartesian product everything to make sure I don't miss out on anything
 
3:53 PM
@Phil When I was a IT teacher/trainer, more than 10 years ago, I had a student that liked to crash Access by adding all tables (some of them multiple times) in the graphical query grid.
@MaxVernon send him a query like: SELECT DISTINCT COUNT(ALL id) FROM table;
 
28 minutes until Beer O'Clock
ENough MySQL for 1 week, that's for sure
And why SMSS can't generate INSERT statements for the result of a given query is a tad frustrating
 
4:11 PM
@Phil Write it to a table (SELECT INTO) and use SSMS to script the data? (assuming small)
 
@ypercube Free on 2008R2
@PaulWhite Yup, ta. Should have thought of that. I blame Friday and MySQL
 
What the heck are "subtilities" ?
 
Just a typo. Subtleties.
 
twice? Thrice!
 
subtleties?
 
4:15 PM
@MaxVernon Hm.
Someone had to lower the tone.
Was expecting it to be @billinkc
(doink doink doink)
 
Call is over Dubs
 
ahhh. He's French.
 
Mais oui.
 
's ok, time to get 11 herbs and spices ready
 
4:16 PM
Chicken o'clock!
 
he even has "subtle" correctly spelled.
 
i hate it when foreign films dont have subtles in them ... i can never understand what's going on
 
Foreigners. HOW DARE THEY. SLAY THE INFIDELS!
 
I make the mistake of listening to movies while I work and inevitably I pick something foreign soooo not really with "just listening"
 
Sorry. Query is running in a SSIS package running on a SQL 2012 server. Data resides on separate SQL 2008 server. — Michael Richardson 4 mins ago
that's confusing
 
4:20 PM
A little shameless self promotion --> dba.stackexchange.com/q/116836/72091
 
I'm still not used to putting square brackets around everything. It just seems..... wrong
 
Use double quotes then
 
1
Q: Loop through tables or copy paste

LouhikeI have to do a migration where I should retrieve data from Access tables, which should contain several of the same columns (but not all, the schemas are different). It is part of a migration to SQL Server through SSIS. A portion of the treatment is the same for all the tables but there are some ...

Needs KFC
 
@Erik that's too complicated for a Friday. Maybe try again on Saturday. I plus one'd it.
 
@Phil I do it mostly because it makes my life easier while refactoring in Visual Studio. Plus I have a (bad?) tendency to use reserved key words like user
 
4:23 PM
Last minute prep here for sql sat kc and a bbq and a speaker dinner
Ping me on Sunday :P
 
Ah.
 
@Erik oh God, please don't use reserved words.
 
@MaxVernon lol
 
@Phil Why are you doing that?
The square brackets on my keyboard only get used when I'm on here, not in SSMS.
 
@Phil The point of the game is to try and avoid that as much as possible.
 
4:25 PM
do you think it would be worthwhile explaining my answer in a bit more detail? I don't want to be too verbose.
1
A: How would you store permutations of a set of simulation parameters, optimizing for storage and efficiency of parsing?

Max VernonI like the idea of storing the test parameters in a single INT column. With that in mind, I've created the following test-bed which may help explain how to create the table with the test parameters, and how to extract those values later. First we create 3 tables we'll use to construct the 0-4, ...

 
For me, anyway
 
Square brackets weren't invented when Oracle was written, you see
 
@MaxVernon And for the love of fluffy bunnies don't use a UDF in a constraint.
4
 
@MaxVernon USER is my biggest offender. otherwise I generally stay clear
 
@Erik and it's a schema name ...
 
4:28 PM
@PaulWhite Yeah that felt really dirty to me, but I wanted to include it just in case someone brought it up.
 
@PaulWhite that's a bunny-boiler for certain.
 
@Erik Not just dirty, unreliable and slow.
 
@PaulWhite would that be relevant for a computed column too? :? :)
 
Still no flags eh.
 
4:29 PM
@MaxVernon that's off-topic for SO
 
@bluefeet Ruby on Rails?
 
@MaxVernon it's too broad and asking for resources
 
@Marian I could have stopped typing after UDF.
 
fair enough.
 
@PaulWhite Because Unreliable Dirty Function
6
 
4:31 PM
Ooo nice.
 
why am I having such a hard time understanding what "flanking" means in this context?
 
Example of a UDF being unreliable in a CHECK constraint.
 
@MaxVernon rhymes with spanking
 
@ypercube that's it!
@Marian thanks for that edit! I can't believe I made such a rookie mistake!
 
hah. canadians
 
4:36 PM
@swasheck I love the edit comment: "grammar nazzi"
I wanted to edit the comment with "spelling nazi", but that would just be over-the-top pedantry.
 
@MaxVernon sounds italian
 
@swasheck yup, it's certainly adds a groove with the extra zee
oops, that's "zed"
 
Zed.
 
lol
 
i thought he was dead
 
4:39 PM
Pulped.
 
I like his chopper
 
GET TO THA CHOPPAH
 
That's why you get no lol from the wife.
 
Hi, @PaulWhite, getting ready for the NZ match?
 
@MDCCL I was thinking about staying up for it, but I'm getting sleepy. We're recording it. My wife has an appointment early in the morning so we can't watch it together anyway, so I'll catch it later today.
 
4:47 PM
LogOp_Select
 
that is too complicated — itsAftab 53 mins ago
Just give me teh codez!
 
what's sql#? precoded and precompiled clr?
 
@MikaelEriksson In case you're interested ^
 
@PaulWhite Thank you. Would've said the same. But you add more professional weight to it :).
 
@swasheck A few assemblies, see above.
 
4:55 PM
fascinating
 
@MaxVernon sorry for it, couldn't help it. Tried to resist though..
for about 20 ms
 
admirable willpower
 
@Marian Thanks!
 
@PaulWhite i have seen it before when looking for some checksum things I believe. Have not looks at the XML stuff. Do you know if it still is maintained/active?
 
@PaulWhite Ah, ok. It's 6:00 AM in NZ, right? So, been asleep, you will avoid the possibility of inadvertently finding out the final score, or you do not mind about that? Is NZ the favourite regarding this match?
 
5:05 PM
@MikaelEriksson Yes it is. Sorry I was pointing you at the XML question though.
 
You where? I guess I have been out of chat for too long to get pinged.
 
@MDCCL Yes 6am Saturday. We will try to avoid the score, but it's not so easy here :) Don't mind too much about this match because we are expected to win pretty easily. Would be a bigger shock than Japan beating SA.
13 mins ago, by Paul White
@MikaelEriksson In case you're interested ^
@MikaelEriksson
DOINK
 
Oh I thought you meant the sql# stuff :)
 
Yes I was less than clear, sorry.
Multiple threads of chat message at the same time.
 
On phone here. Note to self, Needs glasses.
 
5:09 PM
The app is pretty tough to use even with my glasses on.
 
Sure is.
 
@PaulWhite I see why you are not that excited about staying up, since the match is not a particularly difficult one...
 
@PaulWhite ... looking at the output of query_optimizer_estimate_cardinality ... it's pretty interesting as it shows quite a bit about the estimation process and, while i know you dont dabble in XE very much, i was wondering if you might help me understand the estimation/planning process.
there are stats collections generated by this event
 
Hey @srutzky which of yours is the SQLCLR answer you are most pleased with on this site?
 
most of which relate to nodes in the query plan. but some of them are not found in the plan at all. would these be intermediary steps to build estimates?
 
5:15 PM
@MDCCL It's much less fun watching it alone as well. That's the main factor, actually. The rest of my reasoning is just rationalization.
@swasheck Usually they are estimates that pertained to alternatives that didn't make it to the final plan, or related to nodes that were removed by post-optimization plan rewrites.
If that's what you meant by "intermediary steps", then yes.
 
@PaulWhite Moved my a.. to a computer now and all starts to make sense :)
 
So often the way.
 
@PaulWhite yeah ... considered but not used in the final product. thanks!
 
That's annoyingly concise :)
 
sorry. i can be irritating
 
5:19 PM
@MDCCL The England v Australia game is the one I'm really looking forward to this weekend.
From an NZ perspective, we win either way :)
 
colonialists vs. criminals
 
Quite.
 
we give our prisoners ESPN and lethal injections ... they gave theirs an island
 
@PaulWhite Seems definitely worth watching that match. When will the quarter-finals begin, next week?
 
@MDCCL Nah, couple of weeks I think.
Yes first one is Oct 17.
 
5:26 PM
@PaulWhite Couple of weeks? How long is the tournament? I thought it was similar to the association football World Cup...
 
@MDCCL The final is on 31 October. Rugby is physically demanding ;)
 
@PaulWhite Sure it is, I am just getting familiar with it... :)
 
5:47 PM
@itsAftab Not at all. Figuring out what table is used for what parts of the XML is so this is perhaps not entirely correct but you should get the gist of it and rework as you need it to be. pastebin.com/qKMPtQm8 It supports two levels. Not hierarchy of sub-levels below sub-levels. If that is what you want you need to use a while loop and a temp table or a scalar UDF. — Mikael Eriksson 1 min ago
I could not bring my self to post it as answer. If it was on SO I would not hesitate :)
 
@MikaelEriksson Why not? Answers don't have to be a complete solution to the problem. It seems unhappy as a comment.
 
@PaulWhite srutzky has the solution in his answer with a link to a description on how to do it. I just provided the code.
I could reconsider
 
@Phil I've got a client on 9i who are getting ORA-01110 errors from their applications (and SQL Developer), but they aren't showing in the alert log, have you ever encountered something like that? Unfortunately they just terminated their Oracle support contract too!
 
@MikaelEriksson Yes I know. But it is just a link few people will follow.
 
Ok, you have convinced me. I need the points in my internal race to reach 10000 on DBA before 100000 on SO.
2
 
5:55 PM
@MikaelEriksson That would make me happy, yes. Thank you.
@MikaelEriksson That's good because 10 rep on SO = -1 rep on DBA :)
 
1
A: Exporting results to XML

Mikael ErikssonIf your structure is only two levels deep you can use one nested for xml query to build the sub branch part something like this. select H.heading_id as 'BranchID', H.name as 'BranchName', ( select B.business_id as 'SubBranchID', H.heading_id as 'SubParentBrachI...

 
@Marian no problem! I appreciate it cuz the edit makes me look slightly less moronic.
 
@MikaelEriksson Yes, SQL# is still active and maintained :-). Though this has been the longest it has gone between updates. But that is soon to be remedied as I am preparing to release the next version in the next week or so.
 
Just created a plan guide that takes a query from 6+hrs to under 2 minutes. Now that's what I call a RESULT!
 
6:06 PM
@MaxVernon What was the issue?
 
@MikaelEriksson Is there any benefit to enclosing column aliases in single quotes in a FOR XML query? Or was that more of a (bad) habit (to kick)?
 
ohh, first off there are no supporting indexes for the original. Plan generation timed out because of all the joins etc.
I generated a good plan using DBCC OPTIMIZER WHATIF
to shrink the "memory" available to the optimizer
 
Crikey.
 
@srutzky Ha, I did not know it was you behind it. I will have a close look.
 
the query optimizer recommends an index that will have 99.7% impact. But of course, the business doesn't want to/can't implement the index because it "might impact other queries causing invalid results". It would have to go through a complete QCM process.
I understand the "theory" about a new index causing unpredictable results in a tiny set of edge-cases, but really???
 
6:10 PM
I don't.
 
@AndriyM No benefit. You could leave them out if the element is valid as a column alias. Sometimes you need to embed the path expression in the alias like 'root/subnode' and in those cases you could do it with brackets instead. I like the quotes since it makes the alias names stand out in the syntax hilight.
 
@PaulWhite me neither. I was about to ask how an index could cause "invalid results"
 
something about if you have a filtered index on a varchar column containing dates, and the rows in the index have valid dates, while other rows don't have valid dates.
if you remove the index, then queries that ran successfully with the index won't run without it.
who knows, sounds very edge-case to me.
 
@AndriyM But I only do it for XML queries, otherwise I always use brackets but only if needed.
 
@MaxVernon Ah, so transient errors that depend on the access method, OK.
 
6:12 PM
yup
 
@MaxVernon Sounds like there is a bigger problem than indexes going on to me....
 
@Erik there is.
 
@MikaelEriksson I see, thanks for the explanation
 
and as a consultant, its like picking gold up off the floor.
 
@MaxVernon I guess that is par for the course though.
 
6:15 PM
@PaulWhite do you know if a plan guide automatically tells the query optimizer to expect a single row to be returned? I presume it doesn't actually matter since the QO is using the guide.
 
@MaxVernon No, certainly not. It doesn't matter in terms of plan shape of course. Well, not much. It might affect the location of bits n pieces that can't be forced, but otherwise no.
 
with the plan guide in place, the recommended index will still have an estimated impact of 96.2%.
dammit I want to put that index in, just to see. can't do it though :-(
so the query returns 1.6 million rows, with estimated rows of "1".
 
@PaulWhite Paul, yeah, I usually do more than just post a link, but between not having the time to do more, and there being so many, many options, I figured it best for the O.P. to do some reading to see what was possible since they might see something that causes them to rethink a bit of what they are doing or wanting. But thanks to Mikael for posting that example :).
 
@srutzky Of course. I was just encouraging Mikael.
1 hour ago, by Paul White
Hey @srutzky which of yours is the SQLCLR answer you are most pleased with on this site?
@srutzky Do you have an answer to that ^^^
 
@MikaelEriksson If you have any specific questions on it, just contact me via the "Contact Us" page on the SQLsharp.com site.
 
6:23 PM
not such a great answer in my opinion:
0
A: Is it better to use C# for complex business logic that uses SQL and then run it from SQL Server or do everything from within SQL Server?

FrisbeeYes it is a very common practice to have a data repository / data layer, business layer, and presentation layer. The business layer is where you do / enforce business logic. Business layer is (should be) smart enough to only ask the data layer for the appropriate data. Multitier architecture

reluctant to downvote cuz it'll just result in a comment-war
I VtC'd the question as "primarily opinion based"
 
Hey, I just found out about this secluded little spot where all the cool kids hang out so I was reading a little bit to get caught up.

I need to review my answers as I have forgotten some of them. Is the question restricted to just DBA.SE or does it also include the apparently lesser S.O. ;-) ?
 
@MaxVernon Completed.
 
thank you!
 
@srutzky Has to be Database Administrators. I am minded to reward your contributions with a bounty, so looking for a good one to attach it to. Doesn't absolutely have to be
@srutzky Good luck with that. 389,409 messages to read :)
Anyway, I'm off to sleep. I'll catch up later.
 
6:31 PM
@JackDouglas Yes that looks better, thanks. Certainly off-topic these days in any case.
 
@JackDouglas agreed. The OP "tried again"
 
@JackDouglas Are you going to merge it?
 
@PaulWhite I think it's useful as a closed dupe — Google-bait for the next person who wants to ask the same question with slightly different words.
 
Okidoki.
goes to sleep
 
but it's pointless having that answer there
@PaulWhite that's something I wasn't aware you did :)
 
6:37 PM
@JackDouglas Not as much as I probably should, but life's just so full of exciting things to do.
Really going now!
 
ha, goodnight then
 
@PaulWhite That is very honorable of you :). I will review and report back. But it will be at least an hour. Even if I had something in mind right now, I would still wait so as to not provide any additional reason to avoid going to sleep ;-)
 
7:40 PM
Ha learned something about citrix today
our app was slow in citrix but not anyway else, Then you find some documentation "For both values, a larger size slows responsiveness but improves scalability;"
crank that value all the way up to eleven and responsiveness goes up, app is 3 times as fast
8/
larger size improves responsiveness, massively, unlike the docs state
 
8:54 PM
@MaxVernon ... only if a deadlock occurs during that timeframe, right?
0
A: How many deadlocks am i really getting? system health or deadlocks/sec?

Max VernonUse the following query to see exactly how many actual deadlocks your server has experienced over a given amount of time: DECLARE @startval BIGINT; DECLARE @endval BIGINT; SELECT @startval = pc.cntr_value FROM sys.dm_os_performance_counters pc WHERE pc.counter_name LIKE '%deadlock%' AND pc....

 
I'll make it more clear :-)
@swasheck thanks for pointing that out
 
00:00 - 21:0021:00 - 22:00

« first day (1732 days earlier)      last day (3138 days later) »