
Tips to get best SQL performance. Covering all major SQL databases. https://nitter.gq/t.co/pPX9UrXm8p is my book.
Vienna, Austria
Joined April 2011
- Tweets4.9K
- Following3
- Followers53.4K
- Likes267
Pinned Tweet
SQL Performance Explained — A Book For Developers
It focuses on what developers need to know.
Just 200 pages…yet covering all major databases.
sql-performance-explained.co…
14 years online, still relevant and current.
Those who did the quiz 14 years ago can still benefit for their lessons at that time.
use-the-index-luke.com/3-min…
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.
1
10
1,850
Completley free web-book about SQL indexing:
use-the-index-luke.com/
Covering many systems such as MySQL, PostgreSQL, Oracle, ...
Short-Circuiting Correlated Subqueries in SQLite
emschwartz.me/short-circuiti…
2
1,535
Another look into PostgreSQL CTE materialization and non-idempotent subqueries
shayon.dev/post/2025/124/ano…
Improved RCSI Ghost Cleanup in SQL Server 2022
— by Paul White
As always, Paul provides deep insight into the SQL Server implementation.
sql.kiwi/2024/12/improved-gh…
6
1,706
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:
thebuild.com/blog/2024/11/20…
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)?
use-the-index-luke.com/sql/c…
SQL Best Practices Every Java Engineer Must Know
foojay.io/today/sql-best-pra…
[IMHO: not just Java Engineers]
There is currently some fuzz about the performance of subqueries vs with clause.
Here is my take on it:
modern-sql.com/feature/with/…
What every developer should know about SQL performance
- Index/Query (mis)match
- The first power of indexing: finding data quickly
- The second power of indexing: clustering data
- The third power of indexing: sorting data
This and much more is explained on Use The Index, Luke!
use-the-index-luke.com/sql/t…
6
1,819
The Oracle DB maintains some information either on block or on row level ([NO]ROWDEPENDENCIES).
dbaora.com/ora_rowscn-norowd…
The default (NOROWDEPENDENCIES) may cause
ORA-08177: can't serialize access for this transaction
even if there is no problem on row level.
This is one of these very few articles: short, relevant, clear.
A MUST read for everybody—whether using PostgreSQL or not. It is generally good to see how these things work.
Thank you @davidrowley_pg — for the patches too, of course!
citusdata.com/blog/2024/02/0…
When is a secondary index-only query not index-only for InnoDB and Postgres?
In PostgreSQL it is well-know that even Index-Only Scan can have "Heap Fetches". For InnoDB it is hardly known and not visible at all.
smalldatum.blogspot.com/2022…
The OFFSET clause has two problems:
• It make the query slow
• It returns the wrong results
What else do you need?
use-the-index-luke.com/no-of…
Building a faster hash table for high performance SQL joins — by @AndreyPechkurov of @QuestDb
questdb.io/blog/building-fas…
Why Batch Mode Sort Spills Are So Slow [in SQL Server]
sql.kiwi/2023/11/batch-sort-…
8
2,635
Finding All the Red M&Ms: A Story of Indexes and Full‑Table Scans — by @ChrisRSaxon
use-the-index-luke.com/blog/…
