PROGRAMMING
SQL
Practical tutorials for the work we actually do. Pick one, read it in order, and apply it.
0 likes
Likes for this tutorial.
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.
5 min read
0 likes
Likes for this tutorial.
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.
5 min read
0 likes
Likes for this tutorial.
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.
5 min read