postgresql/contrib/pg_stat_statements
Tom Lane 7313cc0163 Improve contrib/pg_stat_statements to lump "similar" queries together.
pg_stat_statements now hashes selected fields of the analyzed parse tree
to assign a "fingerprint" to each query, and groups all queries with the
same fingerprint into a single entry in the pg_stat_statements view.
In practice it is expected that queries with the same fingerprint will be
equivalent except for values of literal constants.  To make the display
more useful, such constants are replaced by "?" in the displayed query
strings.

This mechanism currently supports only optimizable queries (SELECT,
INSERT, UPDATE, DELETE).  Utility commands are still matched on the
basis of their literal query strings.

There remain some open questions about how to deal with utility statements
that contain optimizable queries (such as EXPLAIN and SELECT INTO) and how
to deal with expiring speculative hashtable entries that are made to save
the normalized form of a query string.  However, fixing these issues should
require only localized changes, and since there are other open patches
involving contrib/pg_stat_statements, it seems best to go ahead and commit
what we've got.

Peter Geoghegan, reviewed by Daniel Farina
2012-03-28 21:01:23 -04:00
..
Makefile Make EXPLAIN (BUFFERS) track blocks dirtied, as well as those written. 2012-02-22 20:33:05 -05:00
pg_stat_statements--1.0--1.1.sql Expose track_iotiming information via pg_stat_statements. 2012-03-27 15:18:49 -04:00
pg_stat_statements--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
pg_stat_statements--1.1.sql Expose track_iotiming information via pg_stat_statements. 2012-03-27 15:18:49 -04:00
pg_stat_statements--unpackaged--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
pg_stat_statements.c Improve contrib/pg_stat_statements to lump "similar" queries together. 2012-03-28 21:01:23 -04:00
pg_stat_statements.control Make EXPLAIN (BUFFERS) track blocks dirtied, as well as those written. 2012-02-22 20:33:05 -05:00