pg_stat_statements query normalization

From: Sameer Thakur <samthakur74(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: pg_stat_statements query normalization
Date: 2013-06-17 06:58:15
Message-ID: CABzZFEuc0ww6jHtLKPp44y8mXwr_tXjorXXJdc9E-ArfFU53XQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello,
Reading code documentation of pg_stat_statements it says

* As of Postgres 9.2, this module normalizes query entries. Normalization
* is a process whereby similar queries, typically differing only in their
* constants (though the exact rules are somewhat more subtle than that) are
* recognized as equivalent, and are tracked as a single entry. This is
* particularly useful for non-prepared queries.

Consider query
SELECT * FROM pgbench_branches LEFT JOIN pgbench_tellers ON
pgbench_tellers.bid= pgbench_branches.bid WHERE pgbench_branches.bID*=*5

Does this mean that all queries with just the constant changing are
normalized

pgbench_branches.bID*=*10*,*pgbench_branches.bID*=*15

Or are queries where conditions changed included as well?

pgbench_branches.bID* <*10*,*pgbench_branches.bID*>*15

regards

Sameer

*
*

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Peter Geoghegan 2013-06-17 07:04:23 Re: pg_stat_statements query normalization
Previous Message Simon Riggs 2013-06-16 17:28:43 Re: In progress INSERT wrecks plans on table