Re: pg_stat_statements: calls under-estimation propagation - Mailing list pgsql-hackers

From pilum.70@uni-muenster.de
Subject Re: pg_stat_statements: calls under-estimation propagation
Date
Msg-id alpine.LNX.2.00.1310101313140.5867@ZIVPC313.uni-muenster.de
Whole thread Raw
In response to Re: pg_stat_statements: calls under-estimation propagation  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
Thx for your reply.

On Thu, 10 Oct 2013, Peter Geoghegan wrote:

> On Thu, Oct 10, 2013 at 3:11 AM,  <pilum.70@uni-muenster.de> wrote:
>> But the drawback of this approach is impossibility to use
>> explain analyze without further substitutions.
>
> You can fairly easily disable the swapping of constants with '?'
> symbols, so that the query text stored would match the full originally

I thought I did ?! I introduced an additional user parameter
to disable the normalization in the patch shown in my last mail.

If there is already an easier way in the actual distribution, 
i simply missed ist. 
Where is this behaviour documented?


> executed query. Why would you want to, though? There could be many
> actual plans whose costs are aggregated as one query. Seeing one of
> them is not necessarily useful at all, and could be misleading.
>

Yeah, (thinking of for example parameter ranges) I mentioned that, I think,
but in the majority of cases beginners can easily conclude missing indices
executing explain analyze, because the queries, that are aggregated
and displayed under one query_id have very similar (or simply the same) query plans.

It's also only an option disabled by default: You can simply do nothing, if you don't like it :-)

VlG

Arne Scheffer



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: GIN improvements part 1: additional information
Next
From: Fujii Masao
Date:
Subject: strange behavior of pg_trgm's similarity function