Preview this course
₹299 ₹599 50% off
incl. GST
left at this price!
Sign up to buy Already a member? Log in

7-day money-back guarantee

Bestseller Recently updated Programming · Technology

Database Internals & Query Optimization: 100x Faster Queries

A visual, hands-on tour of how databases really work — storage, the buffer pool, indexes, query plans, joins, transactions, and scaling — with PostgreSQL and MySQL labs that take queries from slow to 100x faster.

4.1 (12 ratings) Created by Ananya Iyer
Advanced 102 lessons 36h 29m Updated Jun 2026 English
Preview this course
₹299 ₹599 50% off
incl. GST
left at this price!
Sign up to buy Already a member? Log in

7-day money-back guarantee

What you'll learn

Explain what a database engine is made of and where queries actually spend their time
Reason about physical storage — pages, rows, heap vs clustered tables, and fragmentation
Understand the buffer pool, cache eviction, and why memory is the difference between fast and slow
Master index internals — B-trees, B+ trees, clustered, composite, covering, hash, and bitmap indexes
Read EXPLAIN/EXPLAIN ANALYZE plans like a pro and find the slow operator fast
Understand the optimizer: statistics, cardinality estimation, join algorithms, and join ordering
Write sargable, optimizer-friendly SQL and recognize the anti-patterns that defeat indexes
Reason about ACID, isolation levels, locking, MVCC, write-ahead logging, and crash recovery
Scale large datasets with partitioning, sharding, distributed query processing, and read caching
Apply engine-specific tuning on PostgreSQL, MySQL/InnoDB, and SQL Server, and diagnose slow queries in production

This course includes

36h 29m of on-demand content
102 lessons across 17 sections
Access on mobile and desktop
Certificate of completion
Lifetime access
Curriculum

Course content

17 sections · 102 lessons · 36h 29m

Section Quiz · Welcome & Course Roadmap 8 min

Pages, Blocks & Disk Layout 25 min
How Rows Are Stored 22 min
Heap Tables Explained 20 min
Clustered Storage 18 min
Data Fragmentation 20 min
Data Types & Schema Design for Performance 35 min
Section Quiz · Database Storage Internals 8 min

Why Memory Is Everything 25 min
Buffer Pool Architecture 22 min
Cache Eviction Algorithms 25 min
Measuring Memory Efficiency 20 min
Connection Management & Pooling 25 min
Section Quiz · Memory & Buffer Pool Internals 8 min

Why Indexes Work 22 min
B-Tree Fundamentals 25 min
B+ Trees 22 min
Clustered vs Non-Clustered Indexes 28 min
Composite Indexes 22 min
Covering Indexes 22 min
Hash Indexes 18 min
Bitmap Indexes 22 min
Partial, Expression & Specialized Indexes 24 min
The Cost of Indexes & Index Strategy 23 min
Section Quiz · Index Internals Deep Dive 8 min

SQL Lifecycle 20 min
Query Trees 22 min
Execution Operators 20 min
Volcano (Iterator) Execution Model 22 min
Vectorized Execution 22 min
Parallel Query Execution 22 min
Plan Caching & Prepared Statements 28 min
Section Quiz · Query Execution Fundamentals 8 min

Understanding EXPLAIN 28 min
Cost Estimation 20 min
Scan Types 22 min
Spotting Bottlenecks 18 min
Execution Plan Labs 26 min
Section Quiz · Reading Execution Plans Like a Pro 8 min

Why Statistics Matter 22 min
Cardinality Estimation 35 min
Histograms 22 min
When Statistics Lie 22 min
Section Quiz · Statistics & Cardinality Estimation 8 min

Nested Loop Join 22 min
Hash Join 22 min
Merge Join 20 min
Join Ordering 25 min
Star Schema Optimization 30 min
Section Quiz · Join Algorithms & Optimization 7 min

Internal Sorting Algorithms 22 min
GROUP BY Internals 20 min
DISTINCT Optimization 20 min
Window Functions Internals 25 min
Section Quiz · Sorting, Grouping & Aggregation 8 min

Sargable Queries 20 min
Predicate Pushdown 20 min
Query Rewriting 22 min
Materialized Views 22 min
Adaptive Query Processing 24 min
Common Query Anti-Patterns 28 min
Section Quiz · Advanced Query Optimization 8 min

ACID Internals 35 min
Isolation Levels & Read Phenomena 28 min
Locking Mechanisms 28 min
MVCC Internals 22 min
Deadlocks 25 min
Section Quiz · Transactions & Concurrency 8 min

Write-Ahead Logging 25 min
Checkpoints 22 min
Crash Recovery 22 min
Replication & Durability Tradeoffs 35 min
Section Quiz · Database Logging & Recovery 8 min

Table Partitioning 28 min
Partition Pruning 24 min
Sharding Fundamentals 24 min
Distributed Query Processing 24 min
Caching & Read-Scaling Strategies 26 min
Section Quiz · Partitioning & Scaling 11 min

PostgreSQL Query Optimization 28 min
MySQL / InnoDB Query Optimization 24 min
SQL Server Optimization 28 min
Cloud Databases 28 min
Production Monitoring & Diagnostics 28 min
Section Quiz · Engine-Specific Optimization & Diagnostics 8 min

30-Second Query → 50 Milliseconds 40 min
Billion-Row Table Optimization 40 min
Dashboard Performance Tuning 40 min
Production Incident War Stories 45 min
Section Quiz · Real-World Performance Case Studies 8 min

Performance Audit 40 min
Query Tuning Challenge 55 min
Design Your Own Optimization Strategy 45 min
Section Quiz · Capstone Project: Become the Query Optimizer 9 min

LSM-Trees & SSTables 30 min
Columnar Storage & Vectorized Engines 28 min
Cloud-Native & Lakehouse Engines 28 min
Cost-Based Optimization in Distributed Systems 28 min
Section Quiz · Bonus — Modern Database Engines 8 min

Requirements

  • Comfort writing SQL — SELECT, JOIN, GROUP BY, and subqueries
  • Basic understanding of data structures (arrays, trees, hash tables) is helpful but not required
  • Access to PostgreSQL 16 and/or MySQL 8 (Docker friendly) to follow the labs
  • No prior database-internals or systems-programming experience required

Description

Most developers can write SQL but treat the database as a black box — so when a query is slow, all they can do is guess. This course opens the box. You'll learn how a database engine actually works, from the bytes on disk to the optimizer's decisions, and use that understanding to take real queries from seconds to milliseconds.

It's a visual, hands-on course built around side-by-side PostgreSQL 16 and MySQL 8 labs, interactive diagrams, and end-to-end performance case studies. Every concept is something you can see, measure, and reproduce.

What you'll learn

  • Storage internals — pages and blocks, how rows are stored, heap vs clustered tables, fragmentation, and schema design for performance
  • Memory — the buffer pool, cache eviction (LRU/Clock), measuring cache efficiency, and connection pooling
  • Indexes — B-trees and B+ trees, clustered vs non-clustered, composite, covering, hash, bitmap, and specialized indexes, plus the real cost of indexing
  • Query execution — the SQL lifecycle, query trees and operators, the Volcano and vectorized models, parallel execution, and plan caching
  • Reading plans — EXPLAIN and EXPLAIN ANALYZE, cost estimation, scan types, and spotting bottlenecks
  • The optimizer — statistics, cardinality estimation, histograms, join algorithms (nested loop, hash, merge), and join ordering
  • Advanced optimization — sargable queries, predicate pushdown, query rewriting, materialized views, adaptive execution, and anti-patterns
  • Transactions — ACID internals, isolation levels, locking, MVCC, and deadlocks
  • Durability — write-ahead logging, checkpoints, crash recovery, and replication trade-offs
  • Scaling — partitioning, partition pruning, sharding, distributed query processing, and read-scaling with caches
  • In practice — engine-specific tuning for PostgreSQL, MySQL/InnoDB, and SQL Server, production diagnostics, and real-world case studies

What you'll do

Interactive widgets let you step a B-tree as it splits, watch the buffer pool evict pages, explore an EXPLAIN plan tree, and race a sequential scan against an index lookup. Hands-on labs and case studies walk the full optimization workflow on realistic problems — and the capstone has you run a documented optimization engagement end to end.

Who it's for

Developers, data engineers, and DBAs who can write SQL but want to understand why queries are slow and how to make them fast. Comfort with SQL is the only hard prerequisite — no prior systems-programming or database-internals experience required.

Your instructor
A

Ananya Iyer

Python & Big Data Engineer · 10 yrs · Data Engineering Lead, Tessellate

4.1 course rating 3 courses

Ananya has built data platforms in Python for a decade, wrangling everything from gnarly ETL jobs to petabyte-scale Spark pipelines. She loves the craft of clean, testable Python and teaching the data-engineering fundamentals that survive whichever framework is trendy this year.

4.1 course rating · 12 ratings

E
Edythe Frami DDS
2 months ago

Fine for the fundamentals, but the pacing was uneven and a couple of topics were glossed over.

Helpful?
J
Juanita Grant
4 months ago

Five stars without hesitation. Everything is explained simply and there is real substance behind it.

Helpful?
R
Rylee Hartmann
10 months ago

Clear and practical. Most of it was excellent; one or two lessons could use a refresh.

Helpful?
P
Prof. Mason Nienow Jr.
1 year ago

Absolutely worth it. The instructor breaks down complex topics into bite-sized lessons that actually stick.

Helpful?

Frequently asked questions

Yes — once you enroll, the course is yours to revisit forever. New revisions and bonus lessons are added at no extra cost.

Finish every lesson and you'll unlock a shareable certificate you can post on LinkedIn or include with job applications.

If the course isn't a fit, request a refund within 7 days of purchase — no questions asked.

Code, slides, and worksheets are downloadable on each lesson page. Videos stream from our CDN so you can watch on any device.

Each course states its level in the hero. If you're comfortable with the prerequisites listed, you're ready to start.

Students also bought

Advanced
System Design

Domain-Driven Design Masterclass

4.2 (49)

Turn tangled, ever-changing business rules into software that is a pleasure to extend. Learn st...

27h 59m Thomas Berger
₹299
Advanced
AI

Generative AI Masterclass

3.9 (109)

A complete, hands-on path from LLM fundamentals to a deployed Generative AI system. You build S...

29h 51m Marcus Chen
₹299
₹299 ₹599
Sign up to buy