« first day (2430 days earlier)      last day (2442 days later) » 
00:00 - 17:0017:00 - 23:00

12:37 AM
@MaxVernon Congrats!
 
@sp_BlitzErik Have you looked at adaptive joins since May?
I'm thinking about making a blog post to make fun of them
 
Dima has a good post on that if you haven't seen it
 
SomewhereSomehow?
 
Yes
 
I read it today. Looked at available literature for once
I have no idea how that guy does what he does
 
12:42 AM
Which isn't to say you shouldn't write about them
 
Do you think that you could find undocumented use hints if you tried?
 
@JoeObbish no, haven't had a reason to.
@JoeObbish same. He's on some weird shit.
 
1:02 AM
@MaxVernon I must say that I agree with the Joe Obbish edit. The removed excerpt was out of place.
 
@sp_BlitzErik speaking of that
this stuff doesn't make any sense
admittedly I've looked at it for ten minutes
but I must be misunderstanding something fundamental
 
1:31 AM
@MDCCL yes, agreed. Thanks, @JoeObbish
@PaulWhite thanks!
@PaulWhite do you have a link?
 
2:02 AM
@JoeObbish thanks! I was wondering how the query processor reused the results of the first attempted join type if it chooses to switch.
 
@MaxVernon arguably Joe Sack covered it: "Adaptive joins will introduce a higher memory requirement than an index nested loop join equivalent plan. The additional memory will be requested as if the nested loop was a hash join. With that additional cost comes flexibility for scenarios where row counts may fluctuate in the build input."
unless you wanted more details than that
 
I never saw Joe's post. At this point I've never seen an adaptive join in my work. Clearly, everything comes with a cost, though.
 
@MaxVernon Well it's new for 2017 so
 
@MaxVernon Would you like to see one?
 
I would link to Erik's post but he uses a sample database no one has ever heard of
And has no space for
 
2:18 AM
indeed
 
@JoeObbish i would love to.
 
there are almost certainly simpler ways to get one, but it's what I had on hand
 
Sweet, Joe. Thanks... I see you just added a CCI instead of a nonclustered filtered columstore index, seems easier.
 
yes, it's primarily so I can give the temp table a silly name
well, and you can do it without any privileges on the server
 
 
3 hours later…
5:50 AM
@MaxVernon ugly
Good morning "The Heap™"
Morning @JackDouglas
 
@hot2use Morning
 
6:13 AM
Morning
@JackDouglas Sorry to bother you but I've noticed recently that dbfiddle's Oracle engine no longer works (at least it doesn't work for me, throws an error page every time). Just wanted to make sure you know about that.
 
6:46 AM
@AndriyM thanks, I didn't know about that!
"ORA-28001: the password has expired"
I forgot they did that :)
 
@JackDouglas 180 days in the default profile
 
OK, fixed now.
alter profile default limit password_life_time unlimited;
@hot2use introduced in 11.1?
 
7:09 AM
I should get notified if this happens again
 
 
1 hour later…
8:37 AM
@JackDouglas I think so
 
8:52 AM
@JackDouglas Thanks!
 
 
1 hour later…
10:21 AM
Just got a mail saying:
> Team X is sick or on vacation today.
 
Hello. Sql Server 2014.
My username in my machine is Royin - which is the active directory user.(dah)
I'm connecting via SSMS to a SQL server via SA account login ( _don't ask me why - this is how we do it here and there's no way to change it_)
Question : is there any query which I can run in SSMS that will show me `royin` ? ( and not `sa` ?)
 
Nope. You can see which workstation you"re connected from...
 
^ Yeah I've managed to do that but I thought I can get the result to be the current logged user ( royin) - probably not....
thanks
(BTW an exec cmd solution will also be valid / powershell / wmic)
 
10:43 AM
If you connect using a sql login SQL Server doesn't even know what your windows account is
 
^ you're right
 
You may be even connecting from non-windows OS
 
11:16 AM
@ypercubeᵀᴹ you won't be able to do that much longer (Change the “add a comment” link text?)
 
11:29 AM
@PaulWhite I offered to buy you an SSD drive that doesn't have Sesame Street characters on it and this is the thanks I get
 
@sp_BlitzErik Actually it was inside a Kinder egg
Or was it a Happy Meal, I forget
 
@PaulWhite Oh that empty NCI is a nice trick
 
But yeah, I'm awfully mean
@TomV Yes it is. Itzik is one clever bunny, and very creative.
Or an awful unnecessary hack that reveals the pointlessness of the current restrictions
Depends on perspective
-3
Q: Slow or no response to Select Top from SSMS 17.1

yogi.bearRunning SSMS17.x on newly established MSSQL-2016-standard. When trying Select Top 100 from object explorer, there is very slow on even no response. When trying on another long-running MSSQL2016 server, it is ok. Trying from SSMS2012 is ok! When scripting directly as new query, it is also ok. Pro...

That's a terrible question, but why would someone flag it rude/abusive?
200
A: What are the “spam” and “rude or abusive” (offensive) flags, and how do they work?

KipWhat makes something spam and when should I flag it? A post should be marked as spam ONLY when it contains an unsolicited message. It should NOT be marked as spam when: The answer contains no useful information, such as an answer that says “I don't care about your problem”. Flag an answer as ...

 
@PaulWhite someone is using the mobile app and hit the wrong line item
Which also doesn't seem to have a mechanism to easily retract flags
 
11:45 AM
Ok then I think I will cancel the flag :)
Thanks
 
I thought it would be obvious when I added the correct flag. Sorry for the slippery finger.
 
@sp_BlitzErik There was only one flag. Mobile sucks btw.
Oh hey this is an awesome post Anatomy Of An Adaptive Join
 
Dunno about awesome, but thanks Jefe
 
12:18 PM
Great post, Brent!
 
back in your tree, obbish
 
12:31 PM
@sp_BlitzErik someone™
 
@dezso price is right music
 
Ah, that's better. Nice lunchtime bouldering
 
12:52 PM
@Philᵀᴹ how's your E9 free solo project?
 
Can someone help me setup the performance schema in mysql?
 
someone is a reserved word
 
@bassxzero not many mysql people here
 
+ There aren't many mysql people in this room
that's what she said ^^
System engineers solution to blocking: reboot the entire stack
 
1:08 PM
@dezso El Capitan summitted, just using one finger
I'm shyte at bouldering. Need loads more practice
 
@Philᵀᴹ aye
@Philᵀᴹ I am going to try the Elbsandstein in September, presumably. Will be an experience.
 
oh, you're talking about rock climbing
i thought this was a cool new european club drug
 
1:27 PM
@dezso That looks awesome
@sp_BlitzErik Indeed :)
 
-1
A: Postgres: How to insert row with autoincrement id

Gilmar LimaI have solution for shis: Alter library sequelize file: squelize/lib/sql-string.js incluid on line 56 this: change if (dialect === 'postgres' || dialect === 'sqlite' || dialect === 'mssql'){ // http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS // http:...

WTF
 
@dezso WTF^2
 
the power of open source
 
Pretty sure anything like this would be too broad or unclear but does anyone have suggestions on where to start troublshooting lockouts that last about a second on a SQL Server 2008r2 DB? This should not be an issue but it impacts users workflow. I have seen things like this(DBCC opentran()) but that my window is super damn small. Admitting I am not a good DBA yet so I don't have a lot of XP in this area.
 
get this: whoisactive.com
run it with @get_locks = 1
 
1:40 PM
@sp_BlitzErik That is something to start with for sure. tips hat
 
FFS, SQL Server 2008R2 doesn't have sequences! WTF!
 
Next year is 2018.
 
You can emulate it, but I get why you'd be irritated
I'm waiting for 2018R2
 
You just missed them. Sequences were new to SQL Server in 2012.
 
doesn't have availability groups either, you should ask for a refund
 
1:50 PM
how did people used to do it back in the day?
 
It has columnstore and in-memory OLTP though, right?
 
It'll all be ok when the SAP upgrade goes live
 
insert a value into a table with an identity column and return the value?
 
@JoeObbish in a bed
 
think you mean in a cave
 
1:51 PM
I know full well the different ways to emulate a sequence, I'm just grumpy because I can't use one :P
 
expected: family friendly
 
people flag the weirdest stuff in chat
 
@Philᵀᴹ you can, once you get off 7 year old software and onto 5 year old software
 
hey I'm actually curious now
 
@JoeObbish puberty is tough
 
1:53 PM
you guys are so unhelpful
are you so old that you all forgot?
 
@JoeObbish no, the better class of people never knew it
 
i like your post about ignore dup key
that's cute
 
Thank you for this awesome blog post, and for your time to reply my question.
April 14, 2017 1:41 AM
New Comments to this post are disabled
poor guy
 
@sp_BlitzErik Thanks. It was one of those nice things where I got to talk about a lot interesting (to me) stuff under one simple premise.
 
2:06 PM
I didn't think about allocating ranges, because I'm lazy
 
@JoeObbish Yeah I missed that one then SQLblog went comments-disabled globally.
 
@dezso that should be an answer
Well, if performance is really a matter, a bit of mess in the code cannot hurt :) Otherwise, you can create those tables as temporary ones, adjust work_mem and temp_buffers, wrap the whole thing in a function and hopefully done. Otherwise, seeing an actual execution plan of your query could help coming up with better ideas. — dezso 13 mins ago
 
@PaulWhite for just your stuff?
 
@JoeObbish I imagine not. Haven't checked. Assume the whole thing is related to recent issues on SQLblog. Quite an old platform now.
Email notifications for comments (which I relied on) stopped working a while ago.
 
new posts can get comments, it looks like
honestly I have no idea why I was thinking of inserts
updates seem to make a lot more sense
Is it a really weird idea to blow up the row size of a sequence table?
as in adding some dummy column so each page can only hold one row
 
2:09 PM
It's valid. Kejser did something similar once to reduce latch contention.
Crikey that was 7 years ago.
Where does the time go.
 
tempdb
 
True.
 
I want to play around with it now
but it's hard to imagine something more useless
 
Not to Phil :)
 
for the missing sequence I'd probably try something like if the update returns nothing, grab an app lock and insert the missing row
I'm pretty terrible with concurrency in general though
 
2:14 PM
Most people are. It's hard.
Like properly difficult.
I learnt a lot by writing things I thought would be safe then spinning up 100 threads.
 
I was going to say...
sounds like you have Erik's hardware budget
do you think the app lock pattern would work? (let me know if I left too much out)
 
Ha, no just a keyboard that is a little too far away right now to be comfortable.
 
oh, it wouldn't work
hmm
 
@JoeObbish It sounds viable, but I distrust app locks in general.
 
Why's that?
 
2:16 PM
By which I mean they work as advertised of course, but it's easy to misuse them
 
4
Q: Clustered Index Selection - PK or FK?

AndyI have a question regarding clustered index selection. I have a SQL Server 2014 table that looks like the following: OrderId int not null IDENTITY (this is the primary key column) OrderDate datetime2 not null CustomerId int not null Description nvarchar(255) null Some folks on my team have s...

 
Or assume that no one will every try to do Something Dumb without taking the required app lock
 
We have an app here that uses it's own locking framework
developers didn't know about app locks or something
makes me cry
 
Not often we see a good question from a new user.
 
2:18 PM
I think the app lock could work
would need to handle the insert carefully though
 
I think a composite clustered index key with CustomerID as the first column will be best since the that's in the WHERE clause of nearly all queries. OrderID or OrderDate may be best for the second column depending on most critical queries. For example, if customers see a chronological list of recent orders after logging in to a web site, OrderDate should be next to optimize ORDER BY OrderDate DESC. — Dan Guzman 23 mins ago
 
I would think that starting a new sequence would be far less common than asking for the next number, so it seems reasonable to do extra work for that piece
 
Spot the non-comment.
 
He's asking for clarification
 
You're getting a trivial and autoparameterized plan for your simple query. Add AND 1 = (SELECT 1); to the end, and you'll get the constant scan/contradiction detection. — sp_BlitzErik 1 min ago
 
2:21 PM
throws hands up in the air
 
"Use this magic ingredient and the disease will be cured"
 
I will add a comment informing him of what he did wrong
 
@ypercubeᵀᴹ so much advanced jargon from @sp_BlitzErik
 
@sp_BlitzErik do you have a blog post about that? I would be interested to read about it
 
I think he's an expert now
 
lol
@sp_BlitzErik Know what else doesn't work? ANSWERS IN COMMENTS — Joe Obbish 24 secs ago
5
 
THE ROASTING FIRES ARE HOT THIS MORNING
i had no wish to provide further detail
so he got a comment
 
@PaulWhite Do you use Adam's framework for spinning up lots of threads?
 
@JoeObbish I used Adam's SQLQueryStress yes
 
maybe I'll do a quick POC
I've been wanting to learn how to use that anyway
 
2:30 PM
I have found it most instructive, as I said.
So many edge cases only show up under really high concurrency.
Much better to get the logic right beforehand, rather than trying to work out what weird race condition happened after the event.
 
i just use it to make threadpool waits happen
 
Concurrency really is the multi-threaded programming of the database world.
Programmers get multi-threading wrong all the time.
Database people get concurrency wrong all the time.
 
wrong getting i'm concurrency right now
 
The right now was right
 
I was so hoping he'd post that message twice.
 
2:36 PM
IT WON'T LET ME SEND DUPES
this chat sucks
 
this chat sucks
 
this chat sucks
chit chat sucks
chitty chitty bang bang
 
Well how about that
 
dupe
dupe
 
see? chat hates concurrency jokes.
 
2:37 PM
Probably adding a zero length space works but who has time
 
time
nope
 
better call Solomon
 
@sp_BlitzErik btw I really like the way you combined those two things into 1 = (SELECT 1)
 
you should trademark it
 
what'd i do?
 
2:39 PM
WHERE 'ERIK' = (SELECT 'ERIK')
 
@sp_BlitzErik so, your real last name is "Darling"?
I wasn't just calling you that?
 
@sp_BlitzErik Avoiding trivial plan and simple param in the same clause
 
@Lamak correct
@PaulWhite oh, yeah, because it's confusing as hell that one isn't the other
 
As I recall, my demos had them separately
@sp_BlitzErik Yes I still have to think about it even now
 
think we'll get a use hint for it?
 
2:41 PM
@sp_BlitzErik what a coincidence
 
has anyone used the new windbg yet?
is it truly less intimidating?
 
@JoeObbish Who knows.
@sp_BlitzErik No I'm too used to the old one and can't be doing with testing a V1 'replacement'.
 
3:01 PM
@ypercubeᵀᴹ Didn't stop someone™ from voting to close it
 
Erik won't like that one answer...
 
what are you talking about
 
a language only cute forest creatures can comprehend
 
0
A: Clustered Index Selection - PK or FK?

John EisbrenerI'm going to disagree with the wiki answer. Choosing CustomerID as the first column of a composite clustered key is going to generate a lot of mid-page splits. You hopefully have lots of existing customers and also get many new customers all the time. Because customers are (hopefully) placing m...

 
hoo, yeah
maybe i can get the peer pressure badge if i answer there
 
3:11 PM
I thought you had an alert that fired whenever someone talked about fragmentation on sql server
 
Are there badges for comments now?
 
pundit
 
they should make one for a thousand deleted comments
 
Didn't even have to look that up did he
@JoeObbish I look forward to Hats each year for that reason
 
my translator goggles appear to be failing. What does he mean by "seeders"?:
Max I somewhat agree with not needing nomenclature for its own sake, however this has been extremely relevant lately in the context of seeders, where the seeders seeding so called "mutable" tables are seeding them with truly fake data, but the seeders seeding "reference tables" are seeding them with more or less real data — chiliNUT 11 hours ago
 
3:13 PM
There's usually a special hat for cleaning comments
 
how many seeds could a seeder seed if a seeder could seed seeds?
 
Is that some kind of a seedy joke?
 
there's a jethro tull joke in there somewhere
 
@JoeObbish apparently, a lot.
 
@sp_BlitzErik Is the merging of customers and orders a valid case for op?
 
@sp_BlitzErik Aren't they using surrogates already?
 
@PaulWhite yeah, but op wonders about the clustered index
and I'm not sure about the merging justification. I'm not sure if it's a valid case for the op (it can't be, but it's not specified)
 
@sp_BlitzErik you should have put a sub-title, "Praise the Heap". The upvotes would follow ;)
 
I'm still not seeing the natural key. Perhaps I need sleep.
 
4:25 PM
@PaulWhite I was about to ask the same
 
@PaulWhite I don't think there's one either, just a wrong way of expressing himself
 
Compound key?
 
yeah
@PaulWhite and not even that, just the clustered index
I mean, not even a "key"
@PaulWhite maybe @sp_BlitzErik answered while sober
3
 
That could explain it.
 
yeah, I'm worried for him now
 
4:32 PM
1 hour ago, by sp_BlitzErik
maybe i can get the peer pressure badge if i answer there
 
so it was a plot
 
What's the betting the table only has 5000 rows anyway.
I'm not sure it matters massively either way.
I guess I'd lean towards Customer, Order if that truly benefits the ORM queries.
 
@PaulWhite you sound like a "bigdatatist"
 
@Lamak Ha yeah. No, I mean simply that it wouldn't matter much at small volumes and/or it would be quick and easy to change.
 
yeah, I know ;-). And I agree
 
4:37 PM
Answer: add a view over the table and index it the opposite way :)
 
@PaulWhite we need to "comment converter" dude to move this to that Q
 
Unfortunately she does not function on chat messages (just comments)
 
@PaulWhite too bad
 
Lucky for me
 
yeah, very convenient
 
4:42 PM
@PaulWhite fully covering NCI ordered the other way would work too.
 
@MaxVernon That too, yes. I'd do both though, for redundancy :)
 
@PaulWhite that reminds me that we have (at least) 8 days to figure out the results of an earlier bet
 
ORMs are terribad, no?
@PaulWhite :-D
 
@dezso ?
 
@Lamak NEVER
sorry, had office hours
had to close the bonk tab
@Lamak don't know, but i've seen it working with clients
@PaulWhite don't know, wasn't clear to me from the question
maybe only reading the responses and answering based on those wasn't the best idea, but hey
 
4:52 PM
BREAKING NEWS: Erik recommends reading the question for increased answer quality
7
 
it depends
 
@sp_BlitzErik Proper DDL would be helpful, I agree. That said:
> OrderId int not null IDENTITY (this is the primary key column)
It is reasonable to guess CustomerId is the same
 
perhaps
 
@PaulWhite how long it will take until a certain user gets himself banned again
 
waits for more downvotes
 
4:54 PM
@dezso Oh that. I thought you were referring to my wager with Joe.
Erik's not going to be happy until he gets Peer Pressure today.
 
i'm gonna put a picture of calvin peeing on the postgres logo in my answer
5
 
It's sort of 50/50 whether The Heap votes to award or deny the badge. Let's watch.
We're a contrary lot.
 
people keep upvoting it :-|
 
People™
 
i didn't even blog about it
c'mon now
 
00:00 - 17:0017:00 - 23:00

« first day (2430 days earlier)      last day (2442 days later) »