Postgres in Production Special Series: What Makes a Statement Unique (Part 2)
Ryan Booz's second episode in the "Postgres in Production" series examines what makes an entry in pg_stat_statements unique, explaining that uniqueness is structural rather than textual. It covers what normalization removes, why SQL comment tags can disappear, and how ORMs, dynamic SQL and multi-database setups can fill the in-memory hash table and hide important queries. The episode also discusses the IN-clause explosion and how Postgres 18, which exposes about 45 columns in the view, fixes it.
AI-written summary, checked against the cited sources. How summaries work