diff options
| author | Fujii Masao <fujii@postgresql.org> | 2020-07-20 11:55:50 +0900 |
|---|---|---|
| committer | Fujii Masao <fujii@postgresql.org> | 2020-07-20 11:55:50 +0900 |
| commit | d05b172a760e0ccb3008a2144f96053720000b12 (patch) | |
| tree | 8acef7bc05b6485a04613c58ae2c3dce50c6701e /src/include/utils | |
| parent | 044dc7b964147ec6303d59320fb743693b22af30 (diff) | |
Add generic_plans and custom_plans fields into pg_prepared_statements.
There was no easy way to find how many times generic and custom plans
have been executed for a prepared statement. This commit exposes those
numbers of times in pg_prepared_statements view.
Author: Atsushi Torikoshi, Kyotaro Horiguchi
Reviewed-by: Tatsuro Yamada, Masahiro Ikeda, Fujii Masao
Discussion: https://postgr.es/m/CACZ0uYHZ4M=NZpofH6JuPHeX=__5xcDELF8hT8_2T+R55w4RQw@mail.gmail.com
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/plancache.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/plancache.h b/src/include/utils/plancache.h index 522020d7635..4901568553c 100644 --- a/src/include/utils/plancache.h +++ b/src/include/utils/plancache.h @@ -130,7 +130,8 @@ typedef struct CachedPlanSource /* State kept to help decide whether to use custom or generic plans: */ double generic_cost; /* cost of generic plan, or -1 if not known */ double total_custom_cost; /* total cost of custom plans so far */ - int num_custom_plans; /* number of plans included in total */ + int64 num_custom_plans; /* # of custom plans included in total */ + int64 num_generic_plans; /* # of generic plans */ } CachedPlanSource; /* |
