The Great Integer To Bigint Compression Swindle
Вставка
- Опубліковано 5 лют 2025
- Become a member! / @erikdarlingdata
Click here for 50% off a health check: training.erikd...
If you like what you see here, you'll love my advanced performance tuning training:
training.erikd...
Andy's post:
am2.co/2019/12...
This is one reason why I'm glad that int is a 64-bit number in CockroachDB. Also, no SCH lock-waits and PK changes are online and surprisingly fast.
Ooh yeah, I dig some of the stuff they’re doing. Rebecca Taft gave a talk at CMU about it a few years back: ua-cam.com/video/wHo-VtzTHx0/v-deo.htmlsi=HBg4TGZnj-iLAXxP
We have the INT to BIGINT dilemma approaching for a few of our tables. Switching to BIGINT is only the beginning. The real work resides in ensuring we find 100% of the existing INT column references in all the stored procedures, functions, ETL packages, etc. Then full regression testing.
There are probably some programmatic ways to do that within SQL Server, but I’m not sure about the rest of the landscape you have to deal with. Stored procedure parameter data types are all queryable, but if you’re declaring variables or anything you’re pretty well screwed.
Andy's page is the best writeup on shadow table walkovers. Legit awesome stuff.
It's the first time that I've heard of him. What is he good at?
It is! I find myself coming back to it a few times a year.
He's just one of the best presenters and teachers of SQL lore from the past years. and friendly and helpful. He hits the details of an issue and notes caveats. You get "…and here are reasons you might not want to do that" rather than "don't do it" from him. @@FlaggedStar
"At some point you gotta dance with who brung ya". Just made my day. 😊
I love that phrase!
This becomes even more fun when that int column is also an identity column...
That’s the reason for having to do it - running up against the 2 billion integer limit.
Thanks Erik! This was very helpful.
On a side note, why do you think Azure and Fabric are not good products?
They’re some of the worst shit ever produced. Would that Microsoft were capable of shame.
It is so stupid this isn't a meta-data only change.
It’s a real tooth in my haggis.