Re: compute_query_id and pg_stat_statements
Julien Rouhaud <rjuju123@gmail.com>
From: Julien Rouhaud <rjuju123@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <bruce@momjian.us>, Stephen Frost <sfrost@snowman.net>, Christoph Berg <myon@debian.org>, Pavel Stehule <pavel.stehule@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Magnus Hagander <magnus@hagander.net>, Fujii Masao <masao.fujii@oss.nttdata.com>, Michael Paquier <michael@paquier.xyz>, Andres Freund <andres@anarazel.de>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-14T02:21:59Z
Lists: pgsql-hackers
On Thu, May 13, 2021 at 09:47:02PM -0400, Tom Lane wrote: > Julien Rouhaud <rjuju123@gmail.com> writes: > > On Fri, May 14, 2021 at 3:12 AM Bruce Momjian <bruce@momjian.us> wrote: > >> I was surprised it was ~2%. > > > Just to be clear, the 2% was a worst case scenario, ie. a very fast > > read-only query on small data returning a single row. As soon as you > > get something more realistic / expensive the overhead goes away. > > Of course, for plenty of people that IS the realistic scenario that > they care about max performance for. I'm not arguing that the scenario is unrealistic. I'm arguing that retrieving the first row of a join between pg_class and pg_attribute on an otherwise vanilla database may not be the most representative workload, especially when you take into account that it was done on hardware that still took 3 ms to do that. Unfortunately my laptop is pretty old and has already proven multiple time to give unreliable benchmark results, so I'm not confident at all that those 2% are even real outside of my machine.
Commits
-
Allow compute_query_id to be set to 'auto' and make it default
- cafde58b337e 14.0 landed
-
Move pg_stat_statements query jumbling to core.
- 5fd9dfa5f50e 14.0 cited