Re: Is it useful to record whether plans are generic or custom? - Mailing list pgsql-hackers

From Tatsuro Yamada
Subject Re: Is it useful to record whether plans are generic or custom?
Date
Msg-id 4008d911-bde2-5dfb-625f-5a4d43e6c765@nttcom.co.jp_1
Whole thread Raw
In response to Re: Is it useful to record whether plans are generic or custom?  (torikoshia <torikoshia@oss.nttdata.com>)
Responses Re: Is it useful to record whether plans are generic or custom?  (torikoshia <torikoshia@oss.nttdata.com>)
List pgsql-hackers
Hi Toricoshi-san,

On 2021/01/12 20:36, torikoshia wrote:
> I suppose it would be normal practice to store past results of
> pg_stat_statements for future comparisons.
> If this is the case, I think that if we only add the number of
> generic plan execution, it will give us a hint to notice the cause
> of performance degradation due to changes in the plan between
> generic and custom.
> 
> For example, if there is a clear difference in the number of times
> the generic plan is executed between before and after performance
> degradation as below, it would be natural to check if there is a
> problem with the generic plan.
...
> Attached a patch that just adds a generic call counter to
> pg_stat_statements.


I think that I'd like to use the view when we faced a performance
problem and find the reason. If we did the fixed-point observation
(should I say time-series analysis?) of generic_calls, it allows us to
realize the counter changes, and we can know whether the suspect is
generic_plan or not. So the patch helps DBA, I believe.

Regards,
Tatsuro Yamada




pgsql-hackers by date:

Previous
From: Tatsuro Yamada
Date:
Subject: Re: Is it useful to record whether plans are generic or custom?
Next
From: "Bossart, Nathan"
Date:
Subject: Re: Add MAIN_RELATION_CLEANUP and SECONDARY_RELATION_CLEANUP options to VACUUM