mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user