pg_stat_statements query normalization - Mailing list pgsql-performance

From Sameer Thakur
Subject pg_stat_statements query normalization
Date
Msg-id CABzZFEuc0ww6jHtLKPp44y8mXwr_tXjorXXJdc9E-ArfFU53XQ@mail.gmail.com
Whole thread Raw
Responses Re: pg_stat_statements query normalization  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
List 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




pgsql-performance by date:

Previous
From: Simon Riggs
Date:
Subject: Re: In progress INSERT wrecks plans on table
Next
From: Peter Geoghegan
Date:
Subject: Re: pg_stat_statements query normalization