From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | "Imseih (AWS), Sami" <simseih(at)amazon(dot)com> |
Cc: | Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Doc update for pg_stat_statements normalization |
Date: | 2023-02-28 00:09:19 |
Message-ID: | Y/1GLxKhfx8W0tUx@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Vik Fearing | 2023-02-28 00:09:27 | Re: SQL JSON path enhanced numeric literals |
Previous Message | Jeff Davis | 2023-02-28 00:03:15 | Re: Non-superuser subscription owners |