PostgreSQL can handle far more than most teams ask of it: document storage, search, geospatial queries, vectors and queues, all in one database. Getting there means understanding how the planner chooses a plan, which index fits which query, and what happens under concurrent load. This course is for people who already write SQL daily and want their Postgres databases to be fast, predictable and easy to operate.
What you'll learn
- Reading
EXPLAIN (ANALYZE, BUFFERS)output and spotting bad estimates - Index types: B-tree, GIN, GiST, BRIN and hash, plus partial, expression and covering indexes
- Statistics, extended statistics and why the planner sometimes gets it wrong
- MVCC, vacuum and autovacuum tuning, and diagnosing table bloat
- Locks, isolation levels and avoiding deadlocks in busy applications
- JSONB modelling: when to use it, operators,
jsonpathand indexing documents - Declarative partitioning for large time-series and log tables
- Full-text search with
tsvector, ranking and trigram similarity - Extensions worth knowing:
pg_stat_statements, pgvector, PostGIS,pg_cron - What changed in PostgreSQL 18, including asynchronous I/O,
uuidv7()and virtual generated columns
Who it's for
- Backend developers whose application database has started to slow down
- Data analysts and engineers running heavy reporting queries on Postgres
- Developers moving from MySQL or a managed NoSQL store who want to use Postgres fully
Prerequisites
- Confident SQL including joins, aggregation and CTEs (see SQL and PostgreSQL Essentials)
- Basic command-line skills
- Docker or a local PostgreSQL install
Outcomes
By the end of this course you will be able to:
- Find slow queries and explain why they are slow from their plans.
- Choose and create indexes that speed up reads without crippling writes.
- Model semi-structured data with JSONB and large tables with partitioning.
- Use extensions for search, vectors and geospatial queries without adding another database.
Projects you'll build
- Slow query clinic – take a seeded application database with a dozen slow queries and fix each one, practising
pg_stat_statements, plan reading and index design. - Event log at scale – a partitioned table holding tens of millions of rows with automated partition creation and retention, practising partitioning, BRIN indexes and
pg_cron. - Store locator with search – find products by text and nearby shops by distance in one query, practising full-text search, trigram matching and PostGIS.
Tools you'll use
PostgreSQL 18, psql, pg_stat_statements, pgvector, PostGIS, pgbench for load, and an EXPLAIN visualiser.
Course outline
| Module | Topic |
|---|---|
| 1 | How PostgreSQL executes a query |
| 2 | Reading EXPLAIN and finding slow queries |
| 3 | Index types and index design |
| 4 | Statistics and planner behaviour |
| 5 | MVCC, vacuum and bloat |
| 6 | Concurrency, locks and isolation |
| 7 | JSONB and semi-structured data |
| 8 | Partitioning large tables |
| 9 | Full-text and fuzzy search |
| 10 | Extensions: pgvector, PostGIS, pg_cron |
| 11 | Configuration, connection pooling and PostgreSQL 18 features |
| 12 | Project: tuning a real application database |
FAQ
How is this different from SQL and PostgreSQL Essentials?
SQL and PostgreSQL Essentials teaches SQL and basic table design. This course assumes that and focuses on internals, performance and advanced features.
Does it cover replication and backups?
We touch on replicas for read scaling. For backup strategy and recovery testing, see Backups and Disaster Recovery.
Will it help with managed Postgres like RDS, Supabase or Neon?
Yes. Query tuning, indexing and JSONB work the same way. We note which settings managed services control for you.
How do I join?
Get in touch and we'll share the current format, schedule and enrolment details.