Free ebook on database indexing: learn B-trees, composite and covering indexes, selectivity, and workload-based performance tuning.
Free ebook content
-
Indexing 101: How Databases Find Data Fast — Data Access Paths and Why Indexes Matter
+ Exercise: In which situation is a database more likely to choose a full table scan instead of an indexed lookup? -
Indexing 101: B-tree Index Fundamentals and How Lookups Work
+ Exercise: When a query requests a range of values (e.g., last_name between 'Kim' and 'Patel'), how does a B-tree index typically retrieve the matching entries efficiently? -
Indexing 101: Selectivity, Cardinality, and When an Index Helps
+ Exercise: A table has an indexed boolean column is_active where about 90% of rows are true. For the query SELECT * FROM events WHERE is_active = true, which access path is most likely to be chosen and why?
-
Indexing 101: Composite Indexes and Column Order for Real Queries
+ Exercise: Why is an index on (org_id, state, created_at DESC) a strong choice for a query that filters by org_id and state and orders by created_at DESC with LIMIT 50? -
Indexing 101: Covering Indexes, Included Columns, and Fewer Lookups
+ Exercise: Which change is most likely to turn a “seek + lookup” plan into a “seek only” plan for a frequently run query? -
Indexing 101: How Indexes Affect Writes, Storage, and Concurrency
+ Exercise: Why can adding more indexes to a write-heavy table increase insert/update latency and reduce throughput?
-
Indexing 101: Recognizing Over-Indexing and Redundant Index Patterns
+ Exercise: Which situation best describes a duplicate index that is an “easy drop” candidate in an over-indexed table? -
Indexing 101: Common Performance Pitfalls That Defeat Indexes
+ Exercise: Which rewrite is most likely to keep an index on a timestamp column usable when filtering for all rows on a specific date? -
Indexing 101: Choosing the Right Indexes from Real Query Workloads
+ Exercise: When optimizing a very frequent query that filters by multiple columns and must return the “top N” rows in a specific order, which indexing approach best supports fast retrieval and early exit?
About the free ebook
Indexing 101: How Databases Find Data Fast
This free ebook explains how database indexes reduce data-access costs and help queries return results efficiently. Learn how databases choose between scanning tables and following index access paths, then connect those choices to practical query design.
Understand the mechanics behind fast lookups
Explore B-tree indexes, the common structure used for ordered searches, range filters, sorting, and joins. The ebook clarifies how lookup paths work and why index usefulness depends on selectivity, cardinality, data distribution, and the number of rows a query must read.
Design indexes for real SQL workloads
Move beyond adding an index to every column. Learn how composite indexes depend on column order, how covering indexes can avoid extra table lookups, and when included columns can improve read performance. Practical guidance helps you match index definitions to filtering, joining, ordering, and projection patterns.
Balance read speed with operational cost
Indexes require storage and maintenance. This ebook examines their effect on inserts, updates, deletes, locking, and concurrency, helping you recognize when additional indexes create more cost than value.
Build better indexing decisions
- Identify queries that benefit from an index.
- Spot redundant and overlapping index patterns.
- Recognize query patterns that can prevent index use.
- Prioritize indexes using actual workload evidence.
Use these principles to interpret database performance issues, refine schema design, and make deliberate indexing choices instead of relying on guesswork.
How does a B-tree index speed up database queries?
It organizes key values in a balanced tree, allowing the database to navigate to matching rows without scanning the entire table.
Why does column order matter in a composite index?
The leading columns determine which filter and sort patterns can efficiently use the index.
When can an index make database performance worse?
Extra indexes increase storage and add maintenance work to inserts, updates, and deletes, especially when they are redundant or rarely used.
This ebook includes:
9 content chapters
Digital certificate of course completion (Free)
Exercises to train your knowledge
100% free, from content to certificate
Ready to get started?
In the app you will also find...
Over 5,000 free courses
Programming, English, Digital Marketing and much more! Learn whatever you want, for free.
Study plan with AI
Our app's Artificial Intelligence can create a study schedule for the course you choose.
From zero to professional success
Improve your resume with our free Certificate and then use our Artificial Intelligence to find your dream job.
You can also use the QR Code or the links below.
























