Tom Zíka

1.3K posts

Tom Zíka banner
Tom Zíka

Tom Zíka

@Zikato25

SQL enthusiast, CET timezone. I like to blog about SQL stuff and have fun making Memes.

Czech Republic Katılım Kasım 2018
174 Takip Edilen263 Takipçiler
Tom Zíka retweetledi
Paul White
Paul White@SQL_Kiwi·
Today in SQL Server things that have been hilariously broken for 16 years: If you 'force' a plan (using any method, including Plan Guides, Query Store, and Automatic Plan Correction) the resulting plan will have its query_hash overwitten by the query_plan_hash. In other words, both plan hash and query plan hash will be given the query plan hash value. The real query hash value is simply lost 🤦‍♂️ This will break anything you have that uses query_hash for any purpose, including scripts and tools. Example repro: 1. Create a table 2. Select from it 3. Capture the XML showplan for the select 4. Run the select again with the XML in a USE PLAN hint Online demo at dbfiddle.uk/ASmaZcJ- In that example, the resulting plan contains: QueryHash="0x10D77A8E4F35F994" QueryPlanHash="0x10D77A8E4F35F994" Notice the identical hashes. This bug affects SQL Server 2008 to 2022 CU16 inclusive. Until Microsoft fix this (and backport it to 2008 🤣) any plans subject to 'forcing' will have an incorrect query hash🥳 Note: Only guided plan search is affected. Supplying individual query hints (except USE PLAN of course) in a plan guide (or via an equivalent feature) does not provoke this misbehaviour.
English
0
11
40
1.6K
Tom Zíka
Tom Zíka@Zikato25·
@British_Airways so you take the money for the seat reservation, assign me completely different seats, and then ghost me for two months (and counting) when I request a refund?
English
16
0
1
217
Tom Zíka
Tom Zíka@Zikato25·
My plan backfired
Tom Zíka tweet media
English
2
0
3
106
Darling Data
Darling Data@erikdarlingdata·
📬 The Decline in Microsoft SQL Server Support: Why Your Business Deserves Better, And How I Can Help: ift.tt/gY1Wv9J 📬
Darling Data tweet media
English
5
2
16
734
Tom Zíka
Tom Zíka@Zikato25·
Currently reading: Why are Columnstore Key Lookups Bad – Forrest Shares Stuff (forrestmcdaniel.com)
English
0
2
4
256
Tom Zíka retweetledi
Chad Baldwin
Chad Baldwin@chad_baldwin·
New blog post: Everything's a case statement! I was having a fun discussion in the SQL Server slack community about how things like IIF, COALESCE, etc are just syntactic sugar for CASE statements. So I thought I'd throw together a blog post about it... chadbaldwin.net/2024/07/30/eve…
English
1
1
3
165
Tom Zíka
Tom Zíka@Zikato25·
I had another idea for a SQL movie poster parody today.
Tom Zíka tweet media
English
0
0
6
105
Tom Zíka retweetledi
Chad Baldwin
Chad Baldwin@chad_baldwin·
It's been a little over 2 years since my last blog post. I finally got around to throwing one together after some encouragement from a few people on the SQL Server Community Slack. chadbaldwin.net/2024/07/09/fun…
English
0
3
11
269
Tom Zíka
Tom Zíka@Zikato25·
Lack of planning on your part does not justify moving to the cloud on my part.
English
1
0
2
111