Skip to Content
0 likes
Read EXPLAIN ANALYZE in 10 Minutes Level: Advanced

Run one slow query with EXPLAIN ANALYZE and read it with a five-question checklist: rows touched, filtered rows, estimates, loops and sort spills. After this, you can find the slow node of a plan and check your fix.

0 likes
Find Slow Queries With pg_stat_statements Level: Advanced

Turn on pg_stat_statements in a Docker container and list the statements that cost the most in total. After this, you know which query to tune first, and you do not have to guess.

0 likes
Find and Fix a Deadlock Level: Advanced

Reproduce a deadlock between two money transfers, read the message, and fix it by locking rows in the same order. After this, you can turn a deadlock detected error into a plain wait.