Re: compute_query_id and pg_stat_statements

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: compute_query_id and pg_stat_statements
Дата
в 12:09:42
Msg-id
20210514120942.GA22344@momjian.us
Ответ на
Список
Дерево обсуждения
compute_query_id and pg_stat_statements Fujii Masao <masao.fujii@oss.nttdata.com>
Re: compute_query_id and pg_stat_statements Bruce Momjian <bruce@momjian.us>
Re: compute_query_id and pg_stat_statements Magnus Hagander <magnus@hagander.net>
Re: compute_query_id and pg_stat_statements Bruce Momjian <bruce@momjian.us>
Re: compute_query_id and pg_stat_statements Tom Lane <tgl@sss.pgh.pa.us>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Tom Lane <tgl@sss.pgh.pa.us>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Tom Lane <tgl@sss.pgh.pa.us>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: compute_query_id and pg_stat_statements Christoph Berg <myon@debian.org>
Re: compute_query_id and pg_stat_statements Bruce Momjian <bruce@momjian.us>
Re: compute_query_id and pg_stat_statements Stephen Frost <sfrost@snowman.net>
Re: compute_query_id and pg_stat_statements Tom Lane <tgl@sss.pgh.pa.us>
Re: compute_query_id and pg_stat_statements Bruce Momjian <bruce@momjian.us>
Re: compute_query_id and pg_stat_statements Magnus Hagander <magnus@hagander.net>
Re: compute_query_id and pg_stat_statements Magnus Hagander <magnus@hagander.net>
Re: compute_query_id and pg_stat_statements Stephen Frost <sfrost@snowman.net>
Re: compute_query_id and pg_stat_statements Tom Lane <tgl@sss.pgh.pa.us>
Re: compute_query_id and pg_stat_statements Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: compute_query_id and pg_stat_statements Stephen Frost <sfrost@snowman.net>
Re: compute_query_id and pg_stat_statements Andres Freund <andres@anarazel.de>
Re: compute_query_id and pg_stat_statements Tom Lane <tgl@sss.pgh.pa.us>
Re: compute_query_id and pg_stat_statements Andres Freund <andres@anarazel.de>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Michael Paquier <michael@paquier.xyz>
Re: compute_query_id and pg_stat_statements Fujii Masao <masao.fujii@oss.nttdata.com>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Fujii Masao <masao.fujii@oss.nttdata.com>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Magnus Hagander <magnus@hagander.net>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: compute_query_id and pg_stat_statements Magnus Hagander <magnus@hagander.net>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Magnus Hagander <magnus@hagander.net>
Re: compute_query_id and pg_stat_statements Magnus Hagander <magnus@hagander.net>
Re: compute_query_id and pg_stat_statements Stephen Frost <sfrost@snowman.net>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
Re: compute_query_id and pg_stat_statements Julien Rouhaud <rjuju123@gmail.com>
On Fri, May 14, 2021 at 12:26:23AM -0400, Tom Lane wrote:
> I then tried a really dumb xor'ing implementation, and
> that gives me a slowdown of 2.2%.  This could undoubtedly
> be improved on further, say by unrolling the loop or
> processing multiple bytes at once.  One problem with it
> is that I suspect it will tend to concentrate the entropy
> into the third/fourth and seventh/eighth bytes of the
> accumulator, since so many of the fields being jumbled
> are 4-byte or 8-byte fields with most of the entropy in
> their low-order bits.  Probably that could be improved
> with a bit more thought -- say, an extra bump of the
> nextbyte pointer after each field.
> 
> Anyway, I think that what we have here is quite an inferior
> implementation, and we can do better with some more thought.

Considering what even a simple query has to do, I am still baffled why
such a computation takes ~2%, though it obviously does since you have
confirmed that figure.

-- 
  Bruce Momjian          https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.



В списке pgsql-hackers по дате отправления
От: Zhihong Yu
Дата:
От: Andrew Dunstan
Дата:
FAQ