Re: Is it useful to record whether plans are generic or custom?
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: torikoshia@oss.nttdata.com
Cc: pgsql-hackers@postgresql.org, masao.fujii@oss.nttdata.com,
tatsuro.yamada.tf@nttcom.co.jp, pavel.stehule@gmail.com,
legrand_legrand@hotmail.com
Date: 2021-01-25T05:10:20Z
Lists: pgsql-hackers
At Tue, 12 Jan 2021 20:36:58 +0900, torikoshia <torikoshia@oss.nttdata.com> wrote in > 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. Agreed. > Attached a patch that just adds a generic call counter to > pg_stat_statements. > > Any thoughts? Note that ActivePortal is the closest nested portal. So it gives the wrong result for nested portals. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
Add generic_plans and custom_plans fields into pg_prepared_statements.
- d05b172a760e 14.0 landed