Cover of The Query Performance Playbook
DRM-free · Yours for good
Databases & Data Systems

The Query Performance Playbook

Indexes, execution plans and the art of a fast SELECT

By Omar El Alaoui

PDF248 pagesIntermediateEnglish

One-time purchase

€49.95

VAT included
where applicable

Ask a question
  • Download starts the moment you pay
  • Reads anywhere a PDF does
  • Edition updates come free
  • Checkout handled securely

About the book

What you’re getting into

Most slow applications are just slow queries wearing a trench coat. This book teaches you to see what the database is really doing — execution plans, index usage, join strategies — and to fix the queries quietly dragging everything down. It's hands-on and grounded in engines like Postgres and MySQL, written for engineers who'd rather tune a query than bolt on another cache.

After you’ve read it

What you’ll be able to do

  • Read an execution plan and trust what it tells you
  • Design indexes that speed reads without wrecking writes
  • Write predicates the planner can actually use
  • Recognise and undo accidental full-table scans
  • Tame joins, grouping and sorts that spill to disk
  • Keep statistics honest so plans stay stable
  • Cut lock contention and deadlocks under concurrency
  • Run a repeatable measure-fix-measure tuning loop

Table of contents

8 ch · 24 parts
  1. 01

    How the Database Thinks

    • What the optimizer is solving
    • Rows, pages and I/O
    • Reading a slow query's story
  2. 02

    Reading Execution Plans

    • Scan versus seek
    • Join algorithms compared
    • Estimated versus actual rows
  3. 03

    Indexes That Earn Their Keep

    • B-tree fundamentals
    • Composite and covering indexes
    • When an index does more harm than good
  4. 04

    Queries the Planner Likes

    • Sargable predicates
    • Avoiding accidental scans
    • Rewriting subqueries and CTEs
  5. 05

    Joins, Aggregation and Sorting

    • Join order and selectivity
    • Grouping efficiently
    • Sorts that spill to disk
  6. 06

    Statistics, Cardinality and Skew

    • Keeping stats fresh
    • Skewed data and bad plans
    • Hints and plan stability
  7. 07

    Transactions and Contention

    • Isolation levels in practice
    • Lock waits and deadlocks
    • Designing away contention
  8. 08

    A Tuning Workflow

    • Finding the queries that matter
    • Measuring before and after
    • Knowing when to stop

The full chapter list, exactly as it appears in your PDF.