Re: Patch: add timing of buffer I/O requests
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <peter@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Greg Smith <greg@2ndquadrant.com>, Magnus Hagander <magnus@hagander.net>, Ants Aasma <ants@cybertec.at>, pgsql-hackers@postgresql.org
Date: 2012-04-11T00:16:50Z
Lists: pgsql-hackers
Peter Geoghegan <peter@2ndquadrant.com> writes: > On 11 April 2012 00:35, Robert Haas <robertmhaas@gmail.com> wrote: >> If people need something like that, couldn't they create it by hashing >> the normalized query text with an arbitrary algorithm? > That supposes that the normalised query text is perfectly stable. It > may well not be, particularly for things like ad-hoc queries or > queries generated by ORMs, across database clusters and over long > periods of time - Indeed, but the hash value isn't stable either given those sorts of assumptions, so I'm not convinced that there's any advantage there. What I think people would actually like to know, if they're in a situation where distinct query texts are getting hashed to the same thing, is *which* different texts got hashed to the same thing. But there's no good way to expose that given the pg_stat_statements infrastructure, and exposing the hash value doesn't help. regards, tom lane