Book
SQL Performance Explained
Everything Developers Need to Know about SQL Performance
Markus Winand
Summary
SQL Performance Explained by Markus Winand is a book on SQL indexing and tuning, written for developers. It explains the internal structure of B-Tree indexes, the column order of composite indexes, and how indexes relate to WHERE and ORDER BY clauses, including the differences among Oracle, SQL Server, PostgreSQL, and MySQL. It treats performance design from the viewpoint of disk I/O. Indexes are easy to forget during development, yet they are a very effective way to tune SQL, and the book explains them from the basics. It keeps database-specific details limited and narrows its focus to what developers must know. Its free online edition, Use The Index, Luke, covers IBM Db2, MySQL, Oracle, PostgreSQL, and Microsoft SQL Server. The book is also sold as a print edition.
Target Readers
- Intermediate and advanced engineers who want to design an index strategy logically
- Developers who want to learn to read execution plans and optimize SQL
- Developers who want to learn how SQL indexes work from the basics, across databases such as Db2, MySQL, Oracle, PostgreSQL, and SQL Server
Tags
Colophon
- ISBN
- 978-3950307849
Get this book
* The link above is an advertisement via Amazon Associates.Related Books
Prerequisites
- Recommended
Tatsujin ni Manabu SQL Tettei Shinansho, 2nd Edition (A Thorough Guide to SQL, Learned from an Expert)
For Those Who Do Not Want to Remain Beginners
Mick
Reason: Once you can write applied SQL, you want to understand why a query is fast or slow from the internal structure of indexes. Markus Winand's 'SQL Performance Explained' builds index design up from how B-Trees work, connecting the way you write SQL with how fast it runs.
- Recommended
SQL Jissen Nyumon (A Practical Introduction to SQL)
Writing Fast, Easy-to-Understand Queries
Mick
Reason: After learning to read execution plans in the practical intro, dig deeper into the internal structure of indexes themselves with Winand's 'SQL Performance Explained'. Understanding index structure clarifies why a plan chooses a given access path, raising the resolution of your tuning.
- Recommended
SQL Queries for Mere Mortals, 4th Edition
A Hands-On Guide to Data Manipulation in SQL
John L. Viescas
Reason: SQL Queries for Mere Mortals concentrates on how to express SELECT, joins, subqueries and grouping in standard SQL. Once writing a WHERE clause or a join no longer takes thought, SQL Performance Explained picks up the next question about those same clauses: how they use an index.
- Related
Tatsujin ni Manabu DB Sekkei Tettei Shinansho, 2nd Edition (A Thorough Guide to DB Design, Learned from an Expert)
Mick
Reason: After learning normalization-centric logical design, this is a supplementary path to understanding how that design rebounds on physical performance. Reading Winand's 'SQL Performance Explained' reveals how table design and key choices govern index efficiency, giving physical grounding to your logical-design decisions.
Next Books
- Recommended
PostgreSQL Tettei Nyumon, 4th Edition (A Thorough Introduction to PostgreSQL)
From Installation to Features and Internals, Application Building, and Administration and Operations
Yuta Kondo, Yuta Masano, Kiyoshi Sakai, Tatsuhito Kasahara, Tatsuo Ishii, et al.
Reason: After grasping RDBMS-agnostic index theory in 'SQL Performance Explained', verify how it is implemented in a concrete product via the Japanese PostgreSQL book. Touching PostgreSQL-specific index types—B-Tree, GiST, GIN, BRIN—and transaction mechanisms lands the abstract theory onto a concrete implementation.
- Recommended
Database Internals
A Deep Dive into How Distributed Data Systems Work
Alex Petrov
Reason: After understanding the internals of B-Tree indexes in 'SQL Performance Explained', broaden your view with Alex Petrov's 'Database Internals' to the LSM-Trees and various storage engines beyond the B-Tree. Comparing data structures with different read/write characteristics cultivates judgment for choosing a database engine.