« first day (1882 days earlier)      last day (3001 days later) » 

1:15 AM
Well, just to show we're not out of the woods yet, the chest infection triggered an asthma attack tonight. Fortunately my fingers and toes are all nice and pink again.
 
 
5 hours later…
6:14 AM
@JSapkota I commented that. My reading of the question is that when they say "duplicate data" they mean duplicated at parent and child table, not in the same table. But I might be wrong. Removed my comment.
 
6:39 AM
@JSapkota I noticed that at the time - I was on that page when the question asker accepted your answer. The comment in question has been self-deleted, so I would say don't worry about it. Appreciate you asking though :)
 
6:55 AM
@ypercubeᵀᴹ Thank you for your kind response.
 
 
1 hour later…
8:05 AM
Hi
 
8:26 AM
2 days ago, by ArtOfCode
@Mathematics Your chat profile seems to have an oddity in it... would you mind linking me to one of your profiles so I can fix that for you?
@Mathematics Did you see that message? ^
@ypercubeᵀᴹ Thanks for reopening that question, I was eating dinner.
 
@PaulWhite I did? I only voted.
Guess the hammer works in both directions.
I was also surprised to close this one:
1
Q: Greatest N per Group in SQL Server

ask_OverflowI want to find classical Greatest N per Group. I have two methods to solve this problem Dense_rank Over() method Min Over() method Both work flawlessly. Now I want to find which one is better and why. Sample data: CREATE TABLE #test ( id INT, NAME VARCHAR(50), ...

Not sure if it's an exact duplicate. If they follow and edit, it may need reopening.
 
@ypercubeᵀᴹ It's double-sided.
 
9:08 AM
morning
 
@ypercubeᵀᴹ Yes it does.
 
9:29 AM
@ypercubeᵀᴹ The point is that the answers would be the same, so yes that's absolutely right to be closed as a duplicate. If the author was intending to ask a question with different answers, they should post that as a new question. As the banner says.
 
Is SQL 2016 released yet ?
 
@Learner No.
 
@Learner No. There are Community Technology Previews (CTPs) available. These are basically beta / pre-release versions of the software which you can try out for free.
 
9:59 AM
@PaulWhite just FYI
Please show the full piece of code that fails - probably in a separate question, like Paul hinted already. — dezso 13 hours ago
 
@dezso Like I hinted? Where? I didn't mean to, if I did. Wouldn't it be ok if he edited it into the current question? I might be missing something, so please be direct.
We can certainly close the current question as unclear until he adds something specific?
 
10:13 AM
Yo
@ConcernedOfTunbridgeWells Home now?
 
10:31 AM
@PaulWhite on their other post (an answer deleted by you)
@PaulWhite what he asks is answered by the duplicate
but there is a completely unrelated problem (which, as it looks now, would be a too localized question, because it's about syntax)
 
@Phil Yes. Got home yesterday.
To all the folks here - thanks for your support and the lovely flowers.
2
 
@dezso Oh I see - you are referring to the standard comment text from the review.
 
@PaulWhite apparently
I was a bit tired at that time to notice all the small details :D
 
@dezso Well, as far as I call tell, he did what he was asked to do: ask a new question instead of asking in an answer. Closing that as a duplicate would seem .... harsh. We either want to answer his specific question about the implementation of the technique in your answer, or we don't.
 
@PaulWhite no
check the times
and the edit history of the question
perhaps if they dropped the original body of the question...
ah, the times are confusing - yesterday is nearly two days ago...
 
10:42 AM
@AndriyM Thanks. Listen what this inventor of super-duper latest Actor reactive paradigm tells to us: knowledge from the seventies is more relevant today than anything else :)
 
@ValentinTihomirov that also looks like a rickrolling attempt
 
@dezso I can check in detail a bit later when I haven't got so many plates in the air, but my recollection is that he is after a specific implementation of your general solution.
If we can achieve that via a small edit to his current question, that seems better to me than closing as a dupe and waiting for a second question.
 
@PaulWhite sure - it's basically removing the original question and leaving all the edits in there
I can do that, if you'd like
then you close-hammer it as unclear?
 
@dezso If you think it will improve the question, go ahead. Delete your latest comment and replace it with one asking for code.
 
11:04 AM
@PaulWhite OK now?
 
Yes thank you. Apologies for slow engagement - multiple chat conversations.
 
@PaulWhite it wasn't that urgent, so no need to apologize
and part of the confusion was introduced my myself
 
@dezso That's because your hair is a bird.
 
11:25 AM
Crickey, Copenhagen is proper expensive
250€/night for a hotel without trying to be fancy
 
You're buying shares in the hotel?
That is very expensive.
 
@TomV wait till you try and buy a beer...
 
@MarkSinkinson Yeah, I should probably forward-fedex myself some beer before I go in 2 weeks
 
11:55 AM
Still no news from SQLFiddle by the way
 
Email server is probably down.
 
How much rep does one need to chat? 15 ?
 
@ypercubeᵀᴹ 20
 
Then why did I get a link to "move the discussion to chat"? dba.stackexchange.com/questions/130770/…
when the OP has only 6 rep?
I see her in the room. Can she not post in the room, even if she's in?
 
12:03 PM
2
A: Disable chat migration notification if one of the users has insufficient rep?

Jeff AtwoodThe problem is that we don't know the user's chat reputation (except on SO and Meta.SO, because there it's identical to the main site rep). So for low-rep users, we'd have to ask the chat site via HTTP -- either when the warning is displayed for the first time, or at least remember that it faile...

@ypercubeᵀᴹ Write access granted.
 
@ypercubeᵀᴹ It's a bit weird because when a moderator moves comments to chat, write access is automatically granted.
 
@PaulWhite damned hairdresser
 
12:18 PM
God....my boss just LOVES WITH (NOLOCK)
 
Fire him.
3
 
He writes it almost on every query....
 
12:33 PM
Can we close this as too localized?
1
Q: case when mysql with multiple conditions

Blue MoonI made the following case when statement in my sql: SELECT *, CASE WHEN lead_time < 14 THEN 0 WHEN (14 <= lead_time < 21 AND days_passed = 8) THEN 1 WHEN (21 <= lead_time < 28 AND days_passed = 15) THEN 1 WHEN (28 <= lead_time < 42 ...

I answered but then noticed it had been cross posted at SO, 40 minutes earlier. It already has an answer there, too: stackoverflow.com/questions/35698710/…
 
12:59 PM
@PaulWhite From a large cannon
 
@ypercubeᵀᴹ Ugh. Cross-site duplicates. Ugh ugh ugh.
@ypercubeᵀᴹ Is it worth migrating your answer to SO for a merge? Otherwise, I'm very tempted to delete it - sorry about the 45 rep loss.
 
@PaulWhite Yeah, just close/delete, whatever.
 
@ypercubeᵀᴹ Your answer looks a little better to me than the SO ones? What do you think?
 
The Jalil guy was also cross-posting: stackoverflow.com/questions/35694632/…
 
Sigh.
 
1:12 PM
/rant on
this restructuredtext + sphinx is such an overengineered piece of shit
why is it a good idea to have such a confusing markup and no easy way to give style
/rant off
 
@PaulWhite By definition. It's the blue background ;)
 
Ha.
 
1:25 PM
Does anyone here use Redgate SQL Compare to deploy changes in SQL Server
?
 
Sep 3 '15 at 18:56, by JNK
I've been using SQL Source control from red gate recently and I like it but using SQL Compare for releases isnt ideal
 
Ah yes, I should learn to use the search on here
We refresh our Development environment from Production (for up to date data), then try to reapply the development differences from before v after. But it doesn't always notice object dependencies
Which isn't ideal...
 
Got it, I've requested a bit more info; happy to keep going if you are. Perf. tuning can be an iterative exercise (and then we'll just ask @Paul White ; ) — wBob 14 mins ago
@wBob Ha!
If you would find it helpful to have a chat room for discussion on that q & a just ask.
 
1:54 PM
@PaulWhite Sure, would be great!
 
Done.
 
I'm not enjoying this drag & drop programming :(
 
2:12 PM
@MarkSinkinson I've had better luck using dbdeploy or DACPACs for deploying changes, provided the release is tested beforehand to make sure the DDL generated is sane.
I'm kind of surprised it's totally missing object dependencies though.
 
@Phil Are you playing with your Lego Mindstorms again boy, get back to real work
 
@TomV I wish I was
 
@JamesLupolt We snapshot the DB state before, then generate a diff after restoring Production into Dev. It was trying to create views before creating tables, which was weird.
 
Doesn't always do that though, might be due to lack of schema qualifying object names...
 
2:21 PM
@MarkSinkinson Yeah, that is weird. I haven't seen other tools get the order of operations wrong.
 
@Phil 404'd, maybe for the best
ha error.php?message=We are sorry. <strong>SAP Business One </strong> is not being sold in , the results.php is 404
 
I imagine Redgate would be interested in your problem?
 
@JamesLupolt I may let them know. We need to do a bit more investigation here first
 
I now a Redgate dev if you need a quick answer
know*
 
2:39 PM
@Phil Cheers. I'll get back to you on that. The person who wrote this is not in for the next couple of days and I want to make sure I'm not wasting anyone's time
 
3:13 PM
A Belgian retired shop owner asked a permit to install a garage door. The permit was denied. Zero fucks were given that day...
 
@TomV brilliant
only wondering why the lights are there
 
@dezso I suspect it's just his old show room (as he was a shop owner) and since he didn't get permission to do construction work he just left them as-is
 
 
2 hours later…
5:06 PM
Just got a nasty gram that the following query was using 6.3GB of tempdb space ~ SELECT * FROM dbo.FactSnapshot WHERE StudentId = 1. How do I prove them wrong
Query generate 2300 rows, not particularly wide table, should be just ints and decimals
I can rerun the query as needed
 
 
2 hours later…
7:03 PM
The article is the method I use
Is dbo.FactSnapshot a view?
Is RCSI enabled on the database, or snapshot isolation in use?
Is it being run on a readable secondary?
All some reasons why tempdb space might be needed
If 6.3 GB of tempdb space takes down a server, though, someone's doing it wrong
 
@billinkc more importantly, is the query written by you?
 
@billinkc How did they determine the 6.3 GIGS?
 
7:22 PM
i'd fire the consultant, personally
 
Why not just charge him for the TempDB space used
 
$50/allocation
 
Slight discount if you use mixed extents
 
and why is the consultant taking a backup/snapshot of a table in production??? i castigate my offshore devs for doing stupid crap like that
 
@Lamak Of course
and it's a table. Have to check isolation level, nothing explicit in the query
No clustering or anything fancy
Well, beyond me, I'm fancy
@Zane that's just what the email said and why my BS detector went off
 
7:26 PM
@billinkc you should go and love yourself
 
and it was a query I ran on thursday or friday and it completed so it seemed odd that the result set shown in SSMS would keep anything bound up
 
yes. i just quoted bieber. i spent part of my weekend at a father/daughter dance ... and OH MY GOSH
 
@swasheck I suggest we learn to love ourselves before it's made illegal
 
@billinkc where is this ahem backup table? is it in tempdb?
 
Nope, it's in MyDatawarehouse
 
7:29 PM
well then. my officially unofficial assumption is that your client's dba is a .fsckturd
 
@swasheck I quoted incubus so we balance out
 
pardon me while i burst into flames
 
🎵
 
@ypercubeᵀᴹ Apart from liking your following answer content, I like the fact that you made the distinction (via comments) between the table structure and the index structure (physical). Would you mind if I incorporate the question that the OP made in his comment and your response to such question to your answer body? I think it's worth having those points in there.
12
A: Improving select query

ypercubeᵀᴹThe table may have a million or a billion or a trillion rows. The answer is the same: Add an appropriate index on the columns used in the WHERE (and other clauses). In this case, a simple index on (name) would be enough. Assuming that the number of rows that match the condition name = 'John' is...

 
7:44 PM
What's Actual Data Size measured in, bytes? It indicates 16,743,639,528
actually, don't answer that. I need to finish writing something that isn't related to this client
 
8:10 PM
Looking for input, is this clear enough or where do I need to elaborate for VMWare laymen?
0
A: VMWare VMotion causing performance to increase?

Tom VVMWare VMotion isn't going to reboot your server, restart any services or drop caches. The VM stays live during the VMotion, so you shouldn't lose cache or plans, unless the host you are moving to is under severe memory pressure and ballooning is active. What does happen during VMotion is increa...

 
@TomV makes sense to me
 
@MDCCL Sure, you don't need to ask.
 
An extra link for the reservations and I think some google-fu on their part should work :)
 
8:26 PM
Performance improvement is not a guarantee of partitioning. It's really not even the main reason to do it ... read here: asktom.oracle.com/pls/asktom/…. Tom explains it better than I ever could :) But in short: it's a tool, to help with administration. — Ditto 2 hours ago
My view on partitioning is generally that it is primarily a decent tool for archival and data lifecycle management - properly indexed data, unless you're dealing with very very large datasets, is normally sufficient enough to avoid the need for partitioning and the incredible licensing costs that are associated with it. Don't think you need to be using it just because it exists as a feature.... — Phil 11 mins ago
It's amazing that partitioning is not a tool for performance, in most databases (as far as I know). Yet, we get a few questions every month of people convinced that partitioning will solve their performance problems. In SQL Server, in MySQL, in Oracle, ...
 
@ypercubeᵀᴹ must be the sharding hype
 
@ypercubeᵀᴹ I think most people go through the partitioning excitement - implementation - disappointment cycle at least once.
2
 
@PaulWhite Is it like the denial-depression-etc cycle?
 
@ypercubeᵀᴹ More than a little bit.
 
@PaulWhite Reminds be of a BrentO's post about dynamic SQL
 
8:35 PM
@TomV Not sure I've read that.
 
But Brent does read my thoughts a lot.
Oh it's Doug.
 
yes just noticed
 
Ha ha that's rather good.
 
@PaulWhite Better than Rick
 
8:40 PM
Oh indeed.
 
@PaulWhite for single-partition queries it works a treat ... for anything else you get nasty degradation
 
Right
 
Ok I'm deleting obvious Rick Rolls on sight now ;)
 
nearly flagged that, @AndriyM
 
:27918918 haha
 
8:45 PM
Thanks. I'm really happy it's deleted. Not sure I would've thought of deleting it myself, even though I meant that as a demo, not actual rickrolling.
Never rickrolled anyone in my life, never gonna get anyone down in the future etc.
 
@AndriyM I believe the correct words would be "never gonna let you down" in the future :)
 
@TomV "let you down", yes. Apparently I haven't listened to it enough to get the words right :)
 
@PaulWhite Thanks for the informative link.
 
It's one of the better help pages.
 
@AndriyM I believe the correct words would be "never have been forced to listen to it enough"
 
8:55 PM
@ypercubeᵀᴹ Thanks. I preferred to ask before, because you could have considered those points were unnecessary, so I would have avoided editing your post.
 
@MDCCL Be brave. Edit. If it's wrong, the author will roll it back. Worst case, his/her post gets bumped to the front page.
 
@TomV I guess I wasn't around much when rickrolling was most popular. :) Certainly haven't been forced to listen to it often enough to stop enjoying the song when I do chance to be listening to it.
 
Well, worst case he/she gets mightily offended, buys a gun, and tracks you down...but
 
speaking of dynamic sql
...
 
!SQL!
 
9:01 PM
Did someone say pi... oh nevermind
 
hold please
thinking
 
@bluefeet Hi @bluefeet
 
@MDCCL thnx. By the way, I don't remember asking. What happened in 1750?
 
Feb 26 at 14:22, by ypercubeᵀᴹ
I'm sure @bluefeet knows a way to do this with some pivot-unpivot magic.
Last pivot mention.
 
@MDCCL @ypercubeᵀᴹ I have been wondering too actually
 
9:04 PM
Aug 9 '15 at 23:40, by ypercube
@MDCCL is there a story behind the (1750) name?
 
@PaulWhite delayed reaction
 
Aug 9 2015 @ypercubeᵀᴹ
 
@PaulWhite It had "unpivot" too, so probably was cancelled out.
 
@AndriyM Oh maybe, yes.
 
@PaulWhite You seem to remember everything. Is that because you are out of the leap day?
Hopefully I'll know the answer in less than an hour.
 
9:12 PM
@AndriyM Yes that. It's not that I use the search box at all.
 
I bet he searched
ha, late
 
No I didn't. I said so quite explicitly above ;)
 
@PaulWhite No, my point is remembering things to start searching for them to begin with.
 
yours appeared while my pink was approaching the enter key :D
 
@PaulWhite Or do you mean you weren't aware that ypercube had asked that?
 
9:16 PM
@AndriyM I remembered someone had. Was amused to find it was the cube.
 
I see
 
@PaulWhite I didn't have the ᵀᴹ then. Alternate universe.
 
It feels like the ™ has been there forever.
 
@PaulWhite Well, it's not cowardice, I prefer to ask before because I respect the opinion of the author of a post about a determined edition. But I get your point
 
@MDCCL I think the problem is that more people don't do it routinely. They should.
So it feels a bit weird editing someone else's content. I get that. The weirdness goes away after the first 50 times :)
 
9:20 PM
@MDCCL I had one edit to a post of mine that showed me what it's about, the collaboration of the OP made the answer much much better
 
i dont always like virus scans, but when i do ... it's during my productive time
 
@ypercubeᵀᴹ 1750 is the year of foundation of a very important place to me, so it's a way to show a small, but deeply felt, tribute to such place.
@PaulWhite Yes, it feels kinda weird.
@TomV I guess it's just a matter of getting used to it, as Paul suggests.
 
@MDCCL It might help to think of it as a suggested edit.
 
@MDCCL My penny dropped once it happened to me, and really improved my answer. it felt much cleaner than a comment
 
Making a good, thoughtful edit is one of the most altruistic things you can do on dba (short of a bounty). You improve their question/answer, bump it for more views, and they get all the rep.
 
9:28 PM
And you get all the praise in The Heap
 
The purpose is, of course, always having a constructive intention.
 
@AndriyM Stars, possibly.
 
@PaulWhite I really like that perspective.
 
@MDCCL It's honestly the way I see it. I sometimes see a quite good answer, and think I could do better. So I add to it. Easier than starting from scratch, and it feels good.
 
Let me go edit a few thousand posts, be right back, ha ha ha! ;-)
 
9:31 PM
I realize that's not entirely altruistic of me, but hey.
Much more fun than dealing with spammers and trolls.
 
Sometimes the intended edit seems to make sense, at other times it seems to make perfect sense. When it's the latter, just go for it, no need to ask.
 
Re editing, I was thinking about promoting the comment here to an answer, being as it is the answer to part 1 at least, and when adding comments it says "try and avoid answering questions in comments". Thoughts?
Or to put it another way, what would a good answer to that question look like?
 
@AndriyM Good point of view, as well. Just a matter of doing it a few times (and gathering the opinions of The Heap regulars, of course) to get a better impression of the implications.
 
@MDCCL Greek chorus more like lol : )
 
@wBob Ha ha! :)
It seems like someone needs an account merging.
-1
Q: i want to draw er diagram for the following

kiranThis system provides information about video games, gaming equipment and accessories (controllers, headsets, etc.) The end-user of this system is a company that sells/rents video games and gaming equipment to its customers. Suppliers supply the shop with games and equipment. The system keeps info...

 
9:40 PM
@wBob That would certainly answer question 1, though it would need a few words as well as the links to be sufficiently standalone. Question 2 would require more work.
@MDCCL The suggested edit? Nothing I can see to indicate it's the same person.
 
Ha, nice didn't spot that
Someone having you on? I don't think there is a 16-core edition of this CPU. Check here. — wBob 15 mins ago
 
I expected that to be Rick.
 
@PaulWhite Hmm yes, I'm thinking "hints are useful in the hands of an experienced performance tuner..." type approach on part 2
 
Or not, it looks more like a do my homework for me (or us) kind of question.
 
@PaulWhite You should know me better by now
 
9:43 PM
@wBob Yes something generic. The question is pretty poor.
 
@PaulWhite lol it should have been. "Never gonna give you ... 16 cores, never gonna give never gonna give ..."
 
> The answer is only as good as the question - Frisbee
 
"We're no strangers to [Intel tick-tock releases], you know the rules, and so do I!"
 
@PaulWhite Yes, the suggested edit, but I think it looks more like a classmate or so is trying to edit the question.
 
@MDCCL Yep I agree. Rejected and closed as unclear. We don't need to waste time on it.
 
9:48 PM
"You wouldn't get this from ... any other [CPU] die!".
 
@dezso If you're around, what's your opinion of this answer?
 
 
1 hour later…
11:05 PM
23
A: How do I move SQL Server database files?

Mike FalYou don't have to stop the SQL Server service to move database files, but you do have to take the specific database offline. This is because you can't move files while they're being accessed and taking the database offline stops the files from being used by the SQL Server application. The proce...

Can someone fix @MikeFal's misspelling off command
It's complaining that it's not 5 characters so I can't edit.
 
done @Zane
 
11:22 PM
Eh?
What did I misspell?
 
commad
 
It was probably some short-lived commadness
2
 
11:41 PM
@AndriyM only 28 months
 
@ypercubeᵀᴹ But who's counting
 

« first day (1882 days earlier)      last day (3001 days later) »