Skip to content
KEDBYTE
Site navigation
How Data Works
Part CVolume CChapters 14–20

Finding Answers

Follow a query through scans, indexes and plans, then measure the actual work.

7 chapters30,114 wordsabout 2 hours reading
Part C chapters
14

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 read
15

Indexes: 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 read
16

B-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 read
17

Hashing, 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 read
18

Query 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 read
19

Aggregation, 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 read
20

Measuring 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