« first day (4306 days earlier)      last day (860 days later) » 

01:20
You're not the boss of me!
01:44
Yea to be fair I've never used a majority of the things I read about, but were still interesting to be aware of.
 
5 hours later…
06:56
Itzik's latest mentions GROUPING SETS sqlperformance.com/2022/10/t-sql-queries/…
Morning
Morning Zed
07:38
Who's Zed?
Now that I'm starting to work with AGs, I finally understand the nightmares DBAs have
 
1 hour later…
09:07
@PaulWhite there is also the possibility of having index on ([PRINT], [DEL_METHOD], [INV_NO]) INCLUDE ([TYPE], ...) WHERE ([TYPE] IN (3,5) AND ...) - if those 3,5 are the most common case.
09:25
@Zikato ...not all DBAs. Only those using AGs.
Morning
@ypercubeᵀᴹ That's true.
09:45
@ErikDarling I don't know, once I got the hang of it then it made perfect sense. Quick rule of thumb from my experience of it: if the grouping sets are strictly subsets of each other then a spool is not needed. Eg ( (ProductId, OrderDate), (ProductId), () ) does not need a spool, but ( (ProductId), (OrderDate), () ) will need one.
I found it useful where a very complex query was being pulled 4 times using UNION and causing deadlocks. I converted it to GROUPING SETS and they were subsets of one another so no spool. As always YMMV.
10:01
it's also useful for silly answers to crazy questions
SELECT id, name
FROM emp
GROUP BY GROUPING SETS ((id, name), (id, name)) ;
:62221546 Quite simple when you think about it: The server needs to calculate the grouping multiple times in different ways.
@Charlieface ignore me. I read (ProductId), (OrderDate) as (ProductId, OrderDate)
A grouping over subsets is far easier, as you can stream the rollup as you go.
Parentheses were a mistake.
SQL was a mistake.
2
 
3 hours later…
12:39
@Zikato 🤔
> Then the secondary replica SQL instance was stopped and the log files were completely deleted to free up space on the secondary replica, and the instance was restarted.
That sentence is...very unsettling.
> the transaction log on the primary replica was over 2TB in size
I guess there were multiple log files, since a log file has a max size of 2 TB.
@SeanGallardy Haha yeah, I wondered about that too.
Also why would you shrink the log if the secondary ran out of space, it'll do nothing.
The secondary has to replay those records.
which it won't get.
so it'll never replay.
Nothing about that is curious
I expected better.
The whole post is really odd.
12:43
Was it Jonathans first time with AGs?
I would think it wasn't
Then again, he did argue with me over an issue <some giant company> had with AGs and never emailed me back when I showed him the data he missed.
That sounds about right.
@SeanGallardy what happened with the chess game?
@Zikato I was busy all day, when I remembered to check it I was told my time was up. Lichess doesn't let me know when people move or time limits or anything, it doesn't seem to work properly.
I'm pretty sure I had the game if I didn't do any super stupid moves.
oh well
ypercube kicked my ass though
13:05
yeah, you'd probably win. Lichess app tells you when people move though
@SeanGallardy he was probably busy having a great weekend
13:36
I'm disappointed I can't find that Twitter thread now.
you can't find me saying "have a great weekend"?
@Zikato It doesn't for me. Chess.com does, but lichess doesn't.
@Charlieface I've been saying this for years
As did Codd
@ErikDarling Ah, for some reason I thought Jonathan said that.
@JoshDarnell no, he said "thanks, i will" or something else that came off v. petulant at the time
HAHAH, that's right
14:10
@bbaird Although Codd's arguments are mainly around the relational aspect. I'm arguing on the language front: it has horribly misintuitive syntax (as opposed to unintuitive, it actively intuits you in the wrong way), and extensibility is poor compared to modern languages (can we have proper modularization, pretty please?), and it's designed in a way that actively promotes code injection and discourages any form of dynamic programming (other than concatting strings and using EXEC).
There is no particular reason why SQL could not have been designed to do the kinds of things allowed in LINQ. For example: a variable which contains a query definition, which is then modified with ordering or filtering. Or vv: pass in any variable containing a query matching say a particular RESULT SET, and modify it by ordering it or filtering it. You simply cannot do any of this without resorting to EXEC and stringifying your code
14:26
@Charlieface I've never felt particularly limited by SQL with the exception of certain recursive operations and I've done some really wild stuff. But I am absolutely not beholden to any experience in traditional languages.
@JoshDarnell But ok...
15:05
In this year of our lord 2022 can we at least agree to stop violating first normal form? I get the whole "key" thing is tricky for people, how about just making sure we've got atomic values from a single domain? Surely that can't be too much to ask.
Thanks, Dear Erik, I removed extra ORDER BY, but I think we need Union because I want to return the result in one batch. — Ehsan HP 43 mins ago
what the shitting shit
15:31
> that type of language is not acceptable on the Stack Exchange network. Please remember that this is supposed to be a professional environment; you can review the Code of Conduct for a refresher on how users are supposed to interact here.
15:44
is there a badge for that
15:55
@ErikDarling he thought you meant to remove UNION.
 
2 hours later…
17:31
Things which increase maintainability and re-use/modularity often seem to conflict with SQL Server performance. That's what kills me.
 
2 hours later…
19:36
@CadeRoux The developer in me is saddened by this too.
20:32
@CadeRoux Not really. You are mainly thinking of scalar UDFs and RBAR procs which are specific problems. I'm thinking things like public private, and classes/namespaces, as well as simple syntax improvements, none of which should affect perf at all.
Even function sargeability can be worked around. See this excellent series from Explain Extended on monotonic functions, which shows how functions could have added properties that define how they react to inputs, allowing the optimizer to reason over them.
Froid was an interesting project from MS Research that gave us scalar function inlining, while not perfect it has a lot of scope for further improvement. Research papers here microsoft.com/en-us/research/project/froid
20:51
@Mithical I reported your action and would suggest you to review the mentioned code yourself as well. The problematic language in that message of mine is hardly even a swear word, and on top of that it was not directed at anyone. 24 hour ban seems ridiculous, considering how I have seen actual cases of offensive messages getting just 30 minute suspensions at most.
21:42
It's a mithtery
21:53
@ypercubeᵀᴹ The weird thing is even after the confusion was resolved, and it was agreed UNION ALL was the better option, it remained unchanged
I'll make an edit later when off phone unless someone beats me to it
@bbaird I'm against this sort of compromise. As time goes by, we should insist on more normalisation, not less. 5NF minimum
I understand the point you're making though
On the SQL thing, I'm broadly against making it into a programming language. I would like to see proper database support for 6NF structures though
The internet seems to make people grumpy
Might've been a mistake
22:24
The internet was most certainly a mistake.
2
Things that weren’t mistakes
Steak
French wine
Cuban cigars
Swiss watches
New Zealand accents
South African accents
Most scotch single malts
Gauloises
Adidas sportswear
Traci Lords
Espresso
Pretty good list
Should I add SQL Server 2017
Which CU?
Aren't they all good
Last quality release
22:33
Yeah I’d roll with that
I have a feeling 2022 won't make the list
Also, is Niko leaving Microsoft
@Zikato Zed's dead, baby. Zed's dead.
Niko seems to be having a tough few Tweets
@user346760 hey that's my line
@ErikDarling he is one enigmatic mf though
Why do the two of you hate the letter Z so much
22:36
@Charlieface He's right even in regards to Views TBH. Most people just don't have the level of refactoring that it matters in the end, but I currently do for some cases.
@ErikDarling Zikato ruined it for everyone
But he probably mispronounces it zee
Mar 27, 2014 at 21:11, by billinkc
zed is dead, baby
Oct 21, 2013 at 19:53, by Mike Fal
@AaronBertrand Actually, that discussion then lead to the fact that I think it's only in the US where we say "Zee". I think everywhere else it's "Zed"
Bruce Willis was great in the Die Hard movies tho
idk that he added much to Pulp Fiction
22:54
Blended right in
Like a zedbra
2
Oh come on be serious you don't say zeebra
I'm getting var-car flashbacks
@PaulWhite No that's the correct pronunciation
@PaulWhite you probably say vegan with a hard g too
Sean continuing his being 100% wrong streak
No steak is wrong steak, except vegan steak or non-steak steak.
2
23:04
@ErikDarling it's pronounced "weirdo"
It's a good job you Americans are amusing
plays American football
🫡🇺🇸
Go Bears!
Oh I thought that said beans
23:21
> plays American football
which is not played with foots, using something that doesn't look like a ball
Are we queued up to make another hand egg joke
Because I will report you for being dull
is there a badge for that
I was going for "hug ovoid" though
Being American is badge enough
23:36
such a badge boy

« first day (4306 days earlier)      last day (860 days later) »