Re: Doc update for pg_stat_statements normalization

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Doc update for pg_stat_statements normalization
Дата
Msg-id Y/1GLxKhfx8W0tUx@paquier.xyz
обсуждение исходный текст
Ответ на Re: Doc update for pg_stat_statements normalization  ("Imseih (AWS), Sami" <simseih@amazon.com>)
Список pgsql-hackers
On Mon, Feb 27, 2023 at 10:53:26PM +0000, Imseih (AWS), Sami wrote:
> Wouldn't be less in terms of memory usage to just store the required
> JumbleState fields in Query[Desc]?
>
> clocations_count,
> highest_extern_param_id,
> clocations_locations,
> clocations_length

Yes, these would be enough to ensure a proper rebuild of the
normalized query in either the 2nd or 3rd call of pgss_store().  With
a high deallocation rate, perhaps we just don't care about bearing
the extra computation to build a normalized qury more than once, still
it could be noticeable?

Anything that gets changed is going to need some serious benchmarking
(based on deallocation rate, string length, etc.) to check that the
cost of this extra memory is worth the correctness gained when storing
the normalization.  FWIW, I am all in if it means code simplifications
with better performance and better correctness of the results.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Non-superuser subscription owners
Следующее
От: Vik Fearing
Дата:
Сообщение: Re: SQL JSON path enhanced numeric literals