« first day (4471 days earlier)      last day (403 days later) » 

5:14 AM
Wordle 652 3/6*

🟩⬛⬛⬛🟨
🟩🟩🟩⬛⬛
🟩🟩🟩🟩🟩
 
5:37 AM
Wordle 652 3/6*

⬛⬛🟩⬛⬛
🟩🟩🟩⬛⬛
🟩🟩🟩🟩🟩
 
 
2 hours later…
8:07 AM
@HannahVernon It replaces all upon checkout
 
 
2 hours later…
10:00 AM
Wordle 652 4/6

🟨⬛⬛⬛⬛
🟨⬛🟩⬛🟨
🟩🟨🟩🟨⬛
🟩🟩🟩🟩🟩
 
 
2 hours later…
12:17 PM
Wordle 652 2/6

⬛🟨⬛⬛⬛
🟩🟩🟩🟩🟩
Morning, a good one indeed.
 
12:39 PM
Very good!
 
 
2 hours later…
2:09 PM
@PaulWhite Your improvements on the top-descending median solution by Farley comes up with a workaround to avoid a Compute Scalar pushdown. You use A complex IIF with GETDATE to avoid it. But appears that you can just OUTER APPLY (VALUES the calculation to prevent the pushdown (note that CROSS APPLY does not work)
I think this is caused by the fact that, while CROSS APPLY (VALUES is normally folded directly inline with the rest of the plan, OUTER seems to cause a Left Join with a Compute Scalar Constant Scan pair, preventing pushdown.
 
Yes, I know how outer apply works thanks
Funnily enough, 8 years later, I don't immediately recall why I chose that particular rewrite
You said "Outer Apply to keep the Compute Scalar parallel" - can you point me at something about that? — Hannah Vernon ♦ Dec 31, 2014 at 15:03
You did remind me of the old Fizz Buzz challenge though
Maybe it was an excuse to use the ODBC scalar function
I really don't remember
Oh and that's the one with the better solution in the comments as well
> Very nice, Robert, thanks. And no, it's rarely impossible to improve my T-SQL: I hope to write about interesting internals and execution plan features, but I know for sure other people write better T-SQL than me :) Anyway, I trust you found rest of the article useful.
That was a long time ago of course. No one writes better T-SQL than me now
6
 
2:56 PM
what fresh hell is this
 
3:07 PM
@ErikDarling let me know if you want to go ahead with the GitHub action
 
3:28 PM
@Zikato sure, what do you have working?
 
CRLF via gitattributes. GitAction that trims the trailing whitespace and replaces tabs with 4 spaces (regardless of the tab length) - I've tested on pushes directly to main branch. Haven't tested on PRs yet and forks
This is the gitattributes PR - github.com/amachanic/sp_whoisactive/pull/96
 
@PaulWhite This isn't the usual difference between CROSS and OUTER, it's more of an internal compiler optimization, so not obvious to most people. Logically the compiler should have been able to infer that the OUTER APPLY (VALUES is also guaranteed to return exactly one row in every case, so it should also have been folded in. But it doesn't do that.
I'd love for something definitive, do you have any knowledge of that part of the optimizer that we can rely on that it will "always" work that way?
@PaulWhite I wasn't telling you off for writing bad SQL, @ErikDarling seems to do a good job of that :-) Was more interested in confirmation that this works how I think it does
 
4:04 PM
I pay Paul to review my T-SQL in hopes of learning new tricks and also to save money on dominatrices
3
@Zikato is it possible for the tab thing to measure tab length and replace with appropriate number of spaces? Sounds good so far though, thank you.
Jeez my phone really didn’t want me to type tab
Sorry @Zikato
Didn’t meant to donk you so many times @Zikato
 
@PaulWhite Thanks! 🙂
 
4:31 PM
@PaulWhite that was a fun time
 
4:46 PM
@ErikDarling Yeah, but it will take time
 

« first day (4471 days earlier)      last day (403 days later) »