Read a PostgreSQL EXPLAIN plan before adding an index
Find the expensive step and distinguish estimates from measurements.
PostgreSQL / SQL / Performance
Practical guides to SQL, PostgreSQL and data processing: NULL comparisons, encodings, query behavior, sources and limitations.
Working with data involves comparison rules, encodings and tool behavior as well as results. These guides explain common causes of errors and ways to investigate them.
Find the expensive step and distinguish estimates from measurements.
Understand IS NULL, three-valued logic and the difference between COUNT(*) and COUNT(column).