SQL Performance Explained — A Book For Developers
It focuses on what developers need to know.
Just 200 pages…yet covering all major databases.
https://t.co/fkbYE74LQt
14 years online, still relevant and current.
Those who did the quiz 14 years ago can still benefit for their lessons at that time.
https://t.co/bgYh8tKg8K
A B-tree is not a binary tree.
A B-tree does not go out of balance. A B-tree is self-balancing: it does *not* require expensive operations to keep the balance.
For this WHERE, what index to create?
WHERE subsidiary_id = 42 AND last_name LIKE '%INA%'
Is (subsidiary_id) enough or should it be (subsidiary_id, last_name)?
https://t.co/Ax09WlDtOB
My favorite change is that MariaDB got an improved "WHERE year(...) = ?" rewriting. https://t.co/9liw4kyyp4
In picture: the green check mark used to be yellow, with the "a" footnote: Unconditionally rewritten—even if only a matching function-based index exists
#DoYouKnow? If your index is getting too big in size, you can index only a subset of the values using Partial Indexes.
Read more here - https://t.co/6aOT5T1Lck
#Databases#SQL
Improved RCSI Ghost Cleanup in SQL Server 2022
— by Paul White
As always, Paul provides deep insight into the SQL Server implementation.
https://t.co/Nc0dfTOnXW
Collations are a wonderful feature.
They solve problems way beyond case-insensitive search: ignoring accents and "numeric" sorting ('10' > '2') are just two more examples.
However, they do have a performance impact as shown by this micro-benchmark:
https://t.co/UOcEoQA38H
If you are not sure what collations are about, please read the entire series by Christophe Pettus:
“Gentlemen, this is a 🏈”: Glyphs, Encodings, Collations, and Locales
https://t.co/JDJ2Vm0hUs
Speaking in Tongues: PostgreSQL and Character Encodings
https://t.co/aLHuWPPM68
At about this time of the day, I run my open-to-everyone trainings.
The last training this year is "SQL Performance Explained", for which I have one spot left. It starts Dec 2nd and is delivered in seven 2-hour long in-person sessions each Mon/Wed/Fri.
https://t.co/86X2Fp1igu
For this WHERE, what index to create?
WHERE subsidiary_id = 42 AND last_name LIKE '%INA%'
Is (subsidiary_id) enough or should it be (subsidiary_id, last_name)?
https://t.co/Ax09WlDtOB
Finding for the most recent, best matching, highest ranking rows (“Top-N”) is a common problem.
The window functions ROW_NUMBER, RANK and DENSE_RANK can be used for such queries.
Not all systems optimize these queries well—PostgreSQL 15 just learned it.
https://t.co/TX0HBY1iHh
In the meanwhile enjoy a discount for SQL Performance Explained if you don't have it yet: 15YrsAnniversary
Only valid when purchasing directly from me (not on Amazon, ...):
https://t.co/qE63UZfEEl
(but valid for all languages — see language selection at the top).