« first day (4997 days earlier)      last day (29 days later) » 

12:09 AM
Standard product behaviour. No trace flags
12:36 AM
Huh
Is there a hint on the trick
For inquiring minds
1:10 AM
Well obviously there is a special ingredient
Otherwise you would see it all the time
It is horrible though. I guess the only way you could make it worse would be to put it in an Availability Group
Or write the code commas first I guess
1:27 AM
That’s a terrible hint
1:49 AM
Thanks
Ok then. Imagine the chaos that could result from running a delete at read uncommitted
2:36 AM
that seems easy
3:17 AM
Does it
That's saved me some typing then
Good work, team
I might head down to the beach
Easy to imagine
Which I did
It was quite chaotic
3:37 AM
Was it like that
Or that
@PaulWhite you forgot to send it via SB
I didn't want to be too cruel
Delete with NOLOCK
Wordle 1,177 3/6*

⬛⬛🟨⬛⬛
⬛🟩🟩🟨🟨
🟩🟩🟩🟩🟩
I have to go through MongoDB University this week
3:46 AM
Do they spend their time playing pinball and skipping class
Because that's my memory of Uni
There may have been drinks and gothic chicks involved
4:07 AM
Goth girls are the best
2
 
3 hours later…
6:48 AM
Wordle 1,178 4/6*

⬛⬛⬛⬛🟨
🟨⬛🟨⬛⬛
🟩🟩⬛⬛🟩
🟩🟩🟩🟩🟩
 
1 hour later…
8:06 AM
@PaulWhite very nice. Thank you
8:52 AM
yw
Wordle 1,178 4/6*

🟨⬛🟨⬛⬛
⬛⬛🟩⬛🟨
🟨⬛🟩🟨🟨
🟩🟩🟩🟩🟩
 
4 hours later…
12:28 PM
Wordle 1,178 4/6*

⬛⬛⬛⬛⬛
⬛⬛⬛⬛🟨
🟨⬛🟨⬛🟨
🟩🟩🟩🟩🟩
 
2 hours later…
2:49 PM
@HannahVernon it is known.
3:39 PM
Wordle 1,178 3/6

⬜⬜⬜⬜🟨
⬜⬜🟨🟨⬜
🟩🟩🟩🟩🟩
@PaulWhite ty, reading
tablesample, you magnificent bastard
4:20 PM
😁
finally, a way to DELETE with NOLOCK
i always wanted one
I always wanted MIN/MAX in an indexed view
and cross-table constraints
instead you got a cookie
optimism continues unabated
thanks 2 ur classes
can't you do cross-table constraints in a hacky way with scalar udfs
4:27 PM
not in a way that actually works
hence the hacky
I doubt if it's even that if it simply doesn't work properly
what
oh
nice edit
not even a sneaky mod edit
I've typed too much this evening
time for a new ribbon in the type writer
4:30 PM
Random words are starting to appear
ghost people
can't ghost a ghost
I suppose I missed a caption opportunity with "I see ghosts" or sthg
have you seen the vr headset thing that makes random ghosts appear in your house and follow you around
no...?
4:43 PM
well, there's a thing
that would make for a bad trip
you'd have to be on sthg p strong to find it convincing or 4get u were wearing a headset
the sort of strength where u really wouldn't need a headset to see ghosts neway
it stresses me out just thinking about being on anything that strong
I'm told the fear of a thing is often worse than the thing itself
But I'm equally happy for other people to take the risks of proving or disproving that
I'm also not that keen to see ghosts
Or buy a VR headset
i wouldn't mind seeing sexy ghosts
perhaps an appropriately formed succubus
4:57 PM
I don't think it's that exact of a science
Maybe there's a VR BTGG version
i thought some apparitions were u c what u want 2 c
i'm into those
pls c prev remarks about risks and proving
there is a non-zero chance it'd b a gr8 time
well as soon as someone invents young debbie harry vr you'll never hear from me again
5:25 PM
true
5:53 PM
this is sort of interesting
0
Q: Unstable plans when two first index columns have NULL values in all rows

EndrjuI have a weird case of a query that takes long to execute despite having good matching index. The thing is that the values of the 2 first columns in a non-clustered index are NULL in all rows. (For context, it became like that after archiving old data from old business processes). The query has W...

it looks like sql server doesn't maintain an actual histogram for all null values
and you just get table cardinality estimates in the default ce
legacy ce gives you a 1 row estimate
unless i'm missing something
maybe i should use tablesample in my query
what sort of histogram does one expect with a lead column of all NULL values?
or in any situation where the lead column has exactly the same value
bizarre question
well it is odd for the stats to not have a histogram but to have stats properties
SELECT
    s.name,
    h.*,
    p.last_updated,
    p.rows,
    p.rows_sampled,
    p.steps,
    p.unfiltered_rows,
    p.modification_counter,
    p.persisted_sample_percent
FROM sys.tables AS t
JOIN sys.stats AS s
  ON t.object_id = s.object_id
OUTER APPLY sys.dm_db_stats_histogram
(
    t.object_id,
    s.stats_id
) AS h
OUTER APPLY sys.dm_db_stats_properties
(
    t.object_id,
    s.stats_id
) AS p
WHERE t.name = N't1'
AND   h.stats_id IS NULL;
It's also odd to build an index on all the same leading value
I have a faint recollection of seeing this before
locally, a stats update with a sample of 51 percent gives the bad estimate in the new ce, and a sample of 52 percent gives a good estimate
~tipping points~
Have you tried not using the DMVs
DBCC SHOW_STATISTICS (t1, ix_test);
As I recall, sys.dm_db_stats_histogram never used to show the NULL step. They fixed that, but it still doesn't show if NULL is the only step
The other thing is, when there are modifications, the CE has to guess what the new values will be. Should it guess all NULL? Maybe. it doesn't. The only answer to this poor estimate is to stop asking daft questions of the CE.
My mind is just blown by expecting anything except nonsense in this scenario
6:16 PM
yes of course, that's why i found the dmv data puzzling
DBCC SHOW_STATISTICS('dbo.t1', 'test');
DBCC SHOW_STATISTICS('dbo.t1', '_WA_Sys_00000003_5FA91635');
ftr
I can't find a reference for my claim on a quick search, but I'm p sure it's correct
I suppose they sort thought it wasn't worth fixing but idk
JFC
sort indeed
I should stop typing eh
The other other thing being the modelling assumption that people go looking for data b/c it exists
I appreciate them asking a well-formed question
But it is nonsensical
Shame, but that's the way the cookie crumbles sometimes
6:20 PM
i was surprised that the only use hint to sort things was legacy ce. a bunch of the other assumption ones did no good.
> I have this index with the leading column all NULL. I only ever seek to a non-NULL value
My execution plans are bad
mfw
Have u tried SQL Server Clairvoyant Edition
well the fuller stats updates than default sampling do clear the issue after a point for both CEs
i can understand some of the confusion
> Thanks Erik. Please can you also show keyset cursors.
how about no
@ErikDarling Only because then there are no post-stats capture modifications to account 4
What a gr8 summer that intern must have had
@ErikDarling Fun fact: the only cursor a linked server can create is keyset
I plan to watch that 2morrow
So no spoilers
6:32 PM
D:
Imagine being tasked with replicating the output of an existing command in a DMF, only doing bits of it, and still getting it wrong
And taking an entire season to do it
And this is the hugely popular DMO framework that's particularly easy to extend and implement
GENERATE_SERIES is still stupid as well
SELECT * FROM GENERATE_SERIES(1, 1000, 1.0) AS GS;
At least they improved the initial error message
> Msg 5373, Level 16, State 1, Line 3
All the input parameters should be of the same type. Supported types are tinyint, smallint, int, bigint, decimal and numeric.
The subsequent noise tho
> Msg 206, Level 16, State 2, Line 3
Operand type clash: numeric is incompatible with void type
Msg 206, Level 16, State 2, Line 3
Operand type clash: int is incompatible with void type
Msg 206, Level 16, State 2, Line 3
Operand type clash: int is incompatible with void type
Error messages complaining about the void type 🤦‍♂️
YEEHAW!
Exactly
SELECT * FROM GENERATE_SERIES(2147483647, 2147483648, 1) AS GS;
I mean come on now
How dare you cross an internal data type boundary
Have 300624784 error messages
7:29 PM
Why am I rewarding SQL Server abusers with high quality answers
@PaulWhite you like typing
> DBCC SHOW_STATISTICS shows the NULL row correctly (this is what SSMS uses).
SSMS or SQL Server there?
@ErikDarling SSMS
It's mentioned in the question
oh you mean the stats histogram displayer
JUST CHECKING
it's been a long few days for you
sampling tables and whatnot
> /* In SSMS you can see that there's only 1 step:
yes
WITH CHECK JUST CHECKING
@ErikDarling Yeah, my brain is frazzled
7:42 PM
SSIS, I assume
maintenance plans
so yeah, in a way
ah yeah
TransactionOption doesn't mean SQL Server support it tho, it means the package supports a transaction, if necessary
funny tho
yes
i've just always found the drop down amusing
I should say SQL Server does support Chaos isolation level, but only for TABLESAMPLE
And only when using my more modern def
i think your definition is the best one
7:45 PM
thx man
Mine comes with pictures too
perhaps we could rename uncommitted as the whatever isolation level
I usually use an execution plan from the post but they were so blah
NOFUXGIVEN
nothing shocking in those
practically a tea service
I suppose I could have edited in a nuclear explosion at the Clustered Index Delete
Though it's not really at fault so that's a bit unfair
Also, I'm not Lamak
you are lamakhing certain graphic design talents
7:50 PM
yeah
you are still a very useful engine
always with the positive waves
not much of an Eeyore-core really
Loaded like a freight train
Flyin' like an aeroplane
Feeling like a space brain
One more time tonight
🔫🌹🌹🌹
No more times 4 me
Goodnight
guten nacht
 
1 hour later…
9:04 PM
James Earl Jones died
2
10:04 PM
Darth Vader is dead - Long live Darth Vader!
He only made $9,000 for his role as Darth Vader in the first Star Wars movie and didn't actually wear the costume!
10:25 PM
He was also of Irish extraction - as well as African and Cherokee! Ar dheis Dé go raibh a Anam Dílis - May his Sweet Soul be on the Right side of God! (Traditionally used in death notices in Ireland)...
10:43 PM
> Benjamin Dicken
Jeez, be gentle.
10:59 PM
The earliest movie I ever saw him in was Dr Strangelove

« first day (4997 days earlier)      last day (29 days later) »