Finding Answers
Follow a query through scans, indexes and plans, then measure the actual work.
Scanning, Sorting and the Cost of a Question
A query can return one number after examining millions of records. Another can return hundreds of records after examining only a small region of an…
4,803 words/21 min read15Indexes: Building a Faster Way to Find Things
An index is an extra structure maintained to support particular ways of finding records. It is not a switch that makes every database operation faster.…
4,752 words/21 min read16B-Trees: Ordered Pages, Fast Lookups
You will build a small ordered tree by hand, follow a key from its root to a leaf, split a full page, and read a range across neighbouring leaves. The…
4,628 words/20 min read17Hashing, Search Keys and Collisions
Hashing maps an input to a value that can help organise or check data. The same word appears in hash tables, file digests, partition routing and security…
4,553 words/20 min read18Query Plans and the Optimiser
A query states the answer required; a plan describes a way to obtain it. You will read that plan as a flow of records, estimates and operations rather…
3,913 words/17 min read19Aggregation, Windows and Useful Reports
A report is a calculation over a defined population. Its title, denominator and treatment of missing data matter as much as its SQL syntax. You will move…
3,760 words/16 min read20Measuring Performance Without Fooling Yourself
A performance result is an observation about a defined workload, environment and measurement boundary. Without those definitions, a fast number can be…
3,705 words/16 min read