From: Julien Rouhaud <rjuju123@gmail.com>
To: bokanist@gmail.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17665: pg_stat_statements useless with variable number of parameters in IN close
Date: Thu, 27 Oct 2022 20:58:36 +0800
Message-ID: <20221027125836.2qtol4r2vudze725@jrouhaud> (raw)
In-Reply-To: <17665-d10ccd445cd66f6c@postgresql.org>
References: <17665-d10ccd445cd66f6c@postgresql.org>
Hi,
On Thu, Oct 27, 2022 at 10:42:52AM +0000, PG Bug reporting form wrote:
>
> Not really a bug, but this issue makes pg_stat_statements almost useless.
>
> One of my customer have queries with variables number of parameters in IN
> closes
>
> SELECT * FROM my_table WHERE id IN ($1, $2, $3, $4, ...) -- number of
> parameters varies from one to thousands
>
> And some queries have more than one IN close. This bloat the
> pg_stat_statement table with all different version of the same query.
>
> I think the parameters in IN close should be merged as one.
> By the way, where should I submit this kind of improvement request ?
I agree, and this is a known problem however it isn't as simple to fix as it
looks. You can find the latest discussion about it at
https://www.postgresql.org/message-id/flat/CA%2Bq6zcWtUbT_Sxj0V6HY6EZ89uv5wuG5aefpe_9n0Jr3VwntFg%40m...
if you want more details or participate.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: rjuju123@gmail.com, bokanist@gmail.com
Subject: Re: BUG #17665: pg_stat_statements useless with variable number of parameters in IN close
In-Reply-To: <20221027125836.2qtol4r2vudze725@jrouhaud>
References: <17665-d10ccd445cd66f6c@postgresql.org> <20221027125836.2qtol4r2vudze725@jrouhaud>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox