PostgreSQL Performance Engineering
Advanced planner insight, query tuning, and time-series architecture for high-performance PostgreSQL systems - 2 days
Why this course
This advanced two-day hands-on course is designed for experienced SQL and PostgreSQL professionals who want to go beyond writing correct queries and learn how to make them fast, predictable, and scalable. The course focuses heavily on PostgreSQL optimization, especially planner behavior, execution internals, indexing strategy, statistics, and performance tuning techniques used in real production systems.
It also covers TimescaleDB from both an implementation and architecture perspective, including hypertable-based design and the role of columnar storage for analytical workloads. The instructor brings over 30 years of industry experience and teaches using practical, industry-demanded content rather than an academic approach.
Learning outcomes
- Read and interpret advanced PostgreSQL execution plans confidently
- Identify root causes of poor query performance
- Understand planner behavior, costing, and row estimation issues
- Tune queries using indexing, statistics, SQL rewrites, and configuration
- Distinguish key plan nodes and know when each is beneficial or problematic
- Design PostgreSQL databases with TimescaleDB implementation in mind
- Use TimescaleDB hypertables, compression, and columnstore appropriately
- Make better architecture decisions for high-ingest and analytical workloads
Prerequisites
- Strong SQL expertise
- Hands-on PostgreSQL experience
- Familiarity with indexes, joins, vacuum, analyze, and partitioning
- Comfortable reading basic EXPLAIN plans
12 modules
01PostgreSQL performance tuning mindset3 topics
- Performance goals and bottleneck identification
- Query-level tuning versus workload-level tuning
- Benchmarking and tuning workflow
02PostgreSQL internals that affect performance2 topics
- MVCC, heap storage, visibility, and tuple lifecycle
- WAL, checkpoints, autovacuum, and bloat
03Planner and executor deep dive6 topics
- Parse, rewrite, plan, execute
- Cost-based optimization fundamentals
- Planning time versus execution time
- Expected row count versus actual row count
- Filtered rows and rows removed by filter
- Join order and join strategy selection
04Reading execution plans effectively4 topics
- Cost, rows, width, loops, actual time
- Buffers, I/O, timing, and memory clues
- Finding the first bad estimate
- Diagnosing plan instability and regression
05Understanding critical plan nodes7 topics
- Sequential Scan
- Index Scan and Index Only Scan
- Bitmap Index Scan and Bitmap Heap Scan
- Nested Loop, Hash Join, and Merge Join
- Sort, Hash, Aggregate, and Materialize
- Gather, parallel nodes, and Memoize
- Filter versus Join Filter
06Advanced indexing strategy5 topics
- Composite indexes and column order
- Partial indexes
- Expression indexes
- BRIN for large time-oriented datasets
- Index bloat, redundancy, and maintenance
07SQL tuning patterns5 topics
- SARGability and predicate design
- Join rewrites and pre-aggregation
- Window function performance
- CTE and subquery performance considerations
- Pagination and top-N query strategies
08Memory, parallelism, and execution behavior3 topics
- Hash and sort memory usage
- Shared buffers and cache effects
- Parallel query behavior
09PostgreSQL architecture for performance4 topics
- Scale-up versus scale-out decisions
- Connection management and pooling
- Read replicas and workload separation
- Partitioning strategy and pruning
10Database design assuming TimescaleDB7 topics
- Designing for hypertables from the start
- Time column and partitioning strategy
- Chunk interval design
- Indexing hypertables effectively
- High-cardinality dimension design
- Retention-aware schema design
- Designing for continuous aggregates
11TimescaleDB optimization6 topics
- Hypertables and chunk pruning
- Ingestion performance patterns
- Compression and columnstore usage
- Continuous aggregates and refresh strategy
- Retention policies and lifecycle management
- Query patterns for recent versus historical data
12Columnar capabilities and hybrid storage5 topics
- PostgreSQL row-oriented fundamentals
- TimescaleDB columnstore for analytical workloads
- When columnstore helps
- When rowstore remains the better choice
- Designing hybrid hot-and-cold data strategies
A programme built around your team.
Share your training goals and requirements.