Window functions, CTEs and schema design for tables other people also write to. You will join three tables without double counting, rank and total rows with window functions, design tables that protect themselves, and read a query plan to see why a query is slow. If you skip the checks on duplicates, time zones and concurrent changes, your queries will pass on test data and give wrong answers on real data.
Read query plans, choose the right index and change live tables safely. You will read an EXPLAIN ANALYZE plan line by line, pick between B-tree, GIN, GiST and BRIN indexes, understand MVCC, locks and deadlocks, and run migrations and backups that you have proved on a copy. If you skip the plans, the locks and the restore test, your queries will pass on a small table and fail when the table is large and busy.
We value your privacy
We use cookies to keep this website working and, with your permission, enable additional features, measurement and advertising. Accept all, reject all optional cookies, or learn more to customize your choices. Necessary cookies stay active.