Issue - (#54): Planning counters require renaming.

PG-144 : Changing planing counter name to sync with pg_stat_statment.
This commit is contained in:
Ibrar Ahmed
2020-10-12 22:39:44 +00:00
parent f48a64cc0a
commit ec1ff594b4
3 changed files with 10 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ CREATE FUNCTION pg_stat_monitor(IN showtext boolean,
OUT query text,
OUT bucket_start_time timestamptz,
OUT plan_calls int8,
OUT plans int8,
OUT plan_total_time float8,
OUT plan_min_time float8,
OUT plan_max_time float8,
@@ -32,13 +32,13 @@ CREATE FUNCTION pg_stat_monitor(IN showtext boolean,
OUT plan_stddev_time float8,
OUT plan_rows int8,
OUT total_calls int8,
OUT calls int8,
OUT total_time float8,
OUT min_time float8,
OUT max_time float8,
OUT mean_time float8,
OUT stddev_time float8,
OUT affected_rows int8,
OUT rows int8,
OUT shared_blks_hit int8,
OUT shared_blks_read int8,
@@ -103,20 +103,19 @@ CREATE VIEW pg_stat_monitor AS SELECT
'0.0.0.0'::inet + client_ip AS client_ip,
queryid,
query,
plan_calls,
plans,
round( CAST(plan_total_time as numeric), 2)::float8 as plan_total_time,
round( CAST(plan_min_time as numeric), 2)::float8 as plan_min_timei,
round( CAST(plan_max_time as numeric), 2)::float8 as plan_max_time,
round( CAST(plan_mean_time as numeric), 2)::float8 as plan_mean_time,
round( CAST(plan_stddev_time as numeric), 2)::float8 as plan_stddev_time,
plan_rows,
total_calls,
calls,
round( CAST(total_time as numeric), 2)::float8 as total_time,
round( CAST(min_time as numeric), 2)::float8 as min_time,
round( CAST(max_time as numeric), 2)::float8 as max_time,
round( CAST(mean_time as numeric), 2)::float8 as mean_time,
round( CAST(stddev_time as numeric), 2)::float8 as stddev_time,
affected_rows,
rows,
shared_blks_hit,
shared_blks_read,
shared_blks_dirtied,