mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 05:56:21 +00:00
PG-362: pgsm_normalized_query needs to be 0 by default. (#253)
pg_stat_monitor.pgsm_normalized_query needs to be 0 by default because people will get Query examples. This is one of the main user-faced advantages of pgsm over pgss (pg_stat_statements).
This commit is contained in:
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -31,11 +31,11 @@ select datname, substr(query,0,100) as query, calls from pg_stat_monitor order b
|
||||
---------+-----------------------------------------------------------------------------------------------------+-------
|
||||
example | BEGIN | 10000
|
||||
example | END | 10000
|
||||
example | INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES ($1, $2, $3, $4, CURRENT_TIMESTAMP | 10000
|
||||
example | SELECT abalance FROM pgbench_accounts WHERE aid = $1 | 10000
|
||||
example | UPDATE pgbench_accounts SET abalance = abalance + $1 WHERE aid = $2 | 10000
|
||||
example | UPDATE pgbench_branches SET bbalance = bbalance + $1 WHERE bid = $2 | 10000
|
||||
example | UPDATE pgbench_tellers SET tbalance = tbalance + $1 WHERE tid = $2 | 10000
|
||||
example | INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (18, 4, 559735, 3884, CURRENT_TIME | 10000
|
||||
example | SELECT abalance FROM pgbench_accounts WHERE aid = 302191 | 10000
|
||||
example | UPDATE pgbench_accounts SET abalance = abalance + 850 WHERE aid = 142401 | 10000
|
||||
example | UPDATE pgbench_branches SET bbalance = bbalance + 3884 WHERE bid = 4 | 10000
|
||||
example | UPDATE pgbench_tellers SET tbalance = tbalance + 3884 WHERE tid = 18 | 10000
|
||||
example | alter table pgbench_accounts add primary key (aid) | 1
|
||||
example | alter table pgbench_branches add primary key (bid) | 1
|
||||
example | alter table pgbench_tellers add primary key (tid) | 1
|
||||
@@ -47,8 +47,8 @@ select datname, substr(query,0,100) as query, calls from pg_stat_monitor order b
|
||||
example | create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)) | 1
|
||||
example | create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfacto | 1
|
||||
example | drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers | 1
|
||||
example | insert into pgbench_branches(bid,bbalance) values($1,$2) | 10
|
||||
example | insert into pgbench_tellers(tid,bid,tbalance) values ($1,$2,$3) | 100
|
||||
example | insert into pgbench_branches(bid,bbalance) values(1,0) | 10
|
||||
example | insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0) | 100
|
||||
(20 rows)
|
||||
|
||||
SELECT * from pg_stat_monitor_settings;
|
||||
@@ -57,7 +57,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -31,7 +31,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -48,9 +48,9 @@ SELECT * from pg_stat_monitor_settings;
|
||||
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_time from pg_stat_monitor;
|
||||
query | calls | total_plan_time | min_plan_time | max_plan_time | mean_plan_time | stddev_plan_time
|
||||
---------------------------------------------------------------------------------------------------------------------------+-------+-----------------+---------------+---------------+----------------+------------------
|
||||
SELECT * from pg_stat_monitor_settings | 2 | 0.2275 | 0.1088 | 0.1187 | 0.1138 | 0.0049
|
||||
SELECT * from pg_stat_monitor_settings | 2 | 0.2432 | 0.1214 | 0.1219 | 0.1216 | 0.0002
|
||||
SELECT pg_stat_monitor_reset() | 1 | 0 | 0 | 0 | 0 | 0
|
||||
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_time from pg_stat_monitor | 1 | 1.0944 | 1.0944 | 1.0944 | 1.0944 | 0
|
||||
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_time from pg_stat_monitor | 1 | 1.4538 | 1.4538 | 1.4538 | 1.4538 | 0
|
||||
(3 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
@@ -65,7 +65,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -85,7 +85,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -113,12 +113,12 @@ select substr(query, 0,100) as query, calls, total_plan_time, min_plan_time,max_
|
||||
SELECT * from pg_stat_monitor_settings | 2 | 0 | 0 | 0 | 0 | 0
|
||||
SELECT pg_stat_monitor_reset() | 1 | 0 | 0 | 0 | 0 | 0
|
||||
SELECT query, calls, total_plan_time, min_plan_time, max_plan_time, mean_plan_time, stddev_plan_tim | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (max_plan_time = $1) from pg_stat_monitor where calls = $2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (mean_plan_time = $1) from pg_stat_monitor where calls = $2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (min_plan_time = $1) from pg_stat_monitor where calls = $2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (stddev_plan_time = $1) from pg_stat_monitor where calls = $2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (total_plan_time = $1) from pg_stat_monitor where calls = $2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select substr(query, $1,$2) as query, calls, total_plan_time, min_plan_time,max_plan_time,mean_plan | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (max_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (mean_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (min_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (stddev_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select (total_plan_time = 0) from pg_stat_monitor where calls = 2 | 1 | 0 | 0 | 0 | 0 | 0
|
||||
select substr(query, 0,100) as query, calls, total_plan_time, min_plan_time,max_plan_time,mean_plan | 1 | 0 | 0 | 0 | 0 | 0
|
||||
(9 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -32,12 +32,12 @@ SELECT 1 AS num /* First comment */, 'John' as Name /* Second comment*/;
|
||||
(1 row)
|
||||
|
||||
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C";
|
||||
query | comments
|
||||
------------------------------------------------------------------------+------------------------------------------
|
||||
SELECT $1 AS num /* First comment */, $2 as Name /* Second comment*/ | /* First comment */, /* Second comment*/
|
||||
SELECT * from pg_stat_monitor_settings |
|
||||
SELECT pg_stat_monitor_reset() |
|
||||
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C" |
|
||||
query | comments
|
||||
-------------------------------------------------------------------------+------------------------------------------
|
||||
SELECT * from pg_stat_monitor_settings |
|
||||
SELECT 1 AS num /* First comment */, 'John' as Name /* Second comment*/ | /* First comment */, /* Second comment*/
|
||||
SELECT pg_stat_monitor_reset() |
|
||||
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C" |
|
||||
(4 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
@@ -52,7 +52,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -73,12 +73,12 @@ SELECT 1 AS num /* First comment */, 'John' as Name /* Second comment*/;
|
||||
(1 row)
|
||||
|
||||
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C";
|
||||
query | comments
|
||||
------------------------------------------------------------------------+------------------------------------------
|
||||
SELECT $1 AS num /* First comment */, $2 as Name /* Second comment*/ | /* First comment */, /* Second comment*/
|
||||
SELECT * from pg_stat_monitor_settings |
|
||||
SELECT pg_stat_monitor_reset() |
|
||||
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C" |
|
||||
query | comments
|
||||
-------------------------------------------------------------------------+------------------------------------------
|
||||
SELECT * from pg_stat_monitor_settings |
|
||||
SELECT 1 AS num /* First comment */, 'John' as Name /* Second comment*/ | /* First comment */, /* Second comment*/
|
||||
SELECT pg_stat_monitor_reset() |
|
||||
SELECT query, comments FROM pg_stat_monitor ORDER BY query COLLATE "C" |
|
||||
(4 rows)
|
||||
|
||||
Drop extension pg_stat_monitor;
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -37,7 +37,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -63,7 +63,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -44,11 +44,11 @@ select substr(query, 0,50) as query, calls, query_plan from pg_stat_monitor orde
|
||||
query | calls | query_plan
|
||||
---------------------------------------------------+-------+-------------------------------------------
|
||||
CREATE TABLE TBL_0(key text primary key, txt_0 te | 1 |
|
||||
INSERT INTO TBL_0(key, txt_0, value_0) VALUES($1, | 1 |
|
||||
INSERT INTO TBL_0(key, txt_0, value_0) VALUES('00 | 1 |
|
||||
SELECT * from pg_stat_monitor_settings | 1 | Function Scan on pg_stat_monitor_settings
|
||||
SELECT key, txt_0, value_0 FROM TBL_0 | 2 | Seq Scan on tbl_0
|
||||
SELECT pg_stat_monitor_reset() | 1 | Result
|
||||
UPDATE TBL_0 SET value_0 = $1 | 1 |
|
||||
UPDATE TBL_0 SET value_0 = 1681692777 | 1 |
|
||||
(6 rows)
|
||||
|
||||
Drop TABLE TBL_0;
|
||||
@@ -64,7 +64,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -97,12 +97,12 @@ select substr(query, 0,50) as query, calls, query_plan from pg_stat_monitor orde
|
||||
query | calls | query_plan
|
||||
---------------------------------------------------+-------+------------
|
||||
CREATE TABLE TBL_0(key text primary key, txt_0 te | 1 |
|
||||
INSERT INTO TBL_0(key, txt_0, value_0) VALUES($1, | 1 |
|
||||
INSERT INTO TBL_0(key, txt_0, value_0) VALUES('00 | 1 |
|
||||
SELECT * from pg_stat_monitor_settings | 1 |
|
||||
SELECT key, txt_0, value_0 FROM TBL_0 | 2 |
|
||||
SELECT pg_stat_monitor_reset() | 1 |
|
||||
UPDATE TBL_0 SET value_0 = $1 | 1 |
|
||||
select substr(query, $1,$2) as query, calls, quer | 1 |
|
||||
UPDATE TBL_0 SET value_0 = 1681692777 | 1 |
|
||||
select substr(query, 0,50) as query, calls, query | 1 |
|
||||
(7 rows)
|
||||
|
||||
Drop extension pg_stat_monitor;
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -37,7 +37,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -31,11 +31,11 @@ select datname, substr(query,0,100) as query, calls from pg_stat_monitor order b
|
||||
---------+-----------------------------------------------------------------------------------------------------+-------
|
||||
example | BEGIN | 10000
|
||||
example | END | 10000
|
||||
example | INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES ($1, $2, $3, $4, CURRENT_TIMESTAMP | 10000
|
||||
example | SELECT abalance FROM pgbench_accounts WHERE aid = $1 | 10000
|
||||
example | UPDATE pgbench_accounts SET abalance = abalance + $1 WHERE aid = $2 | 10000
|
||||
example | UPDATE pgbench_branches SET bbalance = bbalance + $1 WHERE bid = $2 | 10000
|
||||
example | UPDATE pgbench_tellers SET tbalance = tbalance + $1 WHERE tid = $2 | 10000
|
||||
example | INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (21, 5, 983612, -3378, CURRENT_TIM | 10000
|
||||
example | SELECT abalance FROM pgbench_accounts WHERE aid = 590644 | 10000
|
||||
example | UPDATE pgbench_accounts SET abalance = abalance + -3378 WHERE aid = 983612 | 10000
|
||||
example | UPDATE pgbench_branches SET bbalance = bbalance + -3038 WHERE bid = 3 | 10000
|
||||
example | UPDATE pgbench_tellers SET tbalance = tbalance + -4835 WHERE tid = 68 | 10000
|
||||
example | alter table pgbench_accounts add primary key (aid) | 1
|
||||
example | alter table pgbench_branches add primary key (bid) | 1
|
||||
example | alter table pgbench_tellers add primary key (tid) | 1
|
||||
@@ -47,8 +47,8 @@ select datname, substr(query,0,100) as query, calls from pg_stat_monitor order b
|
||||
example | create table pgbench_history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22)) | 1
|
||||
example | create table pgbench_tellers(tid int not null,bid int,tbalance int,filler char(84)) with (fillfacto | 1
|
||||
example | drop table if exists pgbench_accounts, pgbench_branches, pgbench_history, pgbench_tellers | 1
|
||||
example | insert into pgbench_branches(bid,bbalance) values($1,$2) | 10
|
||||
example | insert into pgbench_tellers(tid,bid,tbalance) values ($1,$2,$3) | 100
|
||||
example | insert into pgbench_branches(bid,bbalance) values(1,0) | 10
|
||||
example | insert into pgbench_tellers(tid,bid,tbalance) values (1,1,0) | 100
|
||||
(20 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
@@ -63,7 +63,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -89,7 +89,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -37,7 +37,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -63,7 +63,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -89,7 +89,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -115,7 +115,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -37,7 +37,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -63,7 +63,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -89,7 +89,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 1 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -37,7 +37,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 1000 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -63,7 +63,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 10000 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -89,7 +89,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 99999 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
|
||||
@@ -11,7 +11,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 10000 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -37,7 +37,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 1000 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -63,7 +63,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 100 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -89,7 +89,7 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | no | no | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
@@ -103,56 +103,3 @@ SELECT * from pg_stat_monitor_settings;
|
||||
pg_stat_monitor.pgsm_track_planning | no | no | Selects whether planning statistics are tracked. | | | yes, no | no
|
||||
(15 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SELECT * from pg_stat_monitor_settings;
|
||||
name | value | default_value | description | minimum | maximum | options | restart
|
||||
------------------------------------------+--------+---------------+----------------------------------------------------------------------------------------------------------+---------+------------+----------------+---------
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 1 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_max | 100000 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
|
||||
pg_stat_monitor.pgsm_query_shared_buffer | 20 | 20 | Sets the maximum size of shared memory in (MB) used for query tracked by pg_stat_monitor. | 1 | 10000 | | yes
|
||||
pg_stat_monitor.pgsm_overflow_target | 1 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
|
||||
pg_stat_monitor.pgsm_enable_query_plan | no | no | Enable/Disable query plan monitoring | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_track | top | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
|
||||
pg_stat_monitor.pgsm_extract_comments | no | no | Enable/Disable extracting comments from queries. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_track_planning | no | no | Selects whether planning statistics are tracked. | | | yes, no | no
|
||||
(15 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
-----------------------
|
||||
|
||||
(1 row)
|
||||
|
||||
SELECT * from pg_stat_monitor_settings;
|
||||
name | value | default_value | description | minimum | maximum | options | restart
|
||||
------------------------------------------+--------+---------------+----------------------------------------------------------------------------------------------------------+---------+------------+----------------+---------
|
||||
pg_stat_monitor.pgsm_max | 100 | 100 | Sets the maximum size of shared memory in (MB) used for statement's metadata tracked by pg_stat_monitor. | 1 | 1000 | | yes
|
||||
pg_stat_monitor.pgsm_query_max_len | 2048 | 2048 | Sets the maximum length of query. | 1024 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_track_utility | yes | yes | Selects whether utility commands are tracked. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_normalized_query | yes | yes | Selects whether save query in normalized format. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_max_buckets | 10 | 10 | Sets the maximum number of buckets. | 1 | 10 | | yes
|
||||
pg_stat_monitor.pgsm_bucket_time | 60 | 60 | Sets the time in seconds per bucket. | 1 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_min | 0 | 0 | Sets the time in millisecond. | 0 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_max | 100000 | 100000 | Sets the time in millisecond. | 10 | 2147483647 | | yes
|
||||
pg_stat_monitor.pgsm_histogram_buckets | 10 | 10 | Sets the maximum number of histogram buckets | 2 | 50 | | yes
|
||||
pg_stat_monitor.pgsm_query_shared_buffer | 20 | 20 | Sets the maximum size of shared memory in (MB) used for query tracked by pg_stat_monitor. | 1 | 10000 | | yes
|
||||
pg_stat_monitor.pgsm_overflow_target | 1 | 1 | Sets the overflow target for pg_stat_monitor | 0 | 1 | | yes
|
||||
pg_stat_monitor.pgsm_enable_query_plan | no | no | Enable/Disable query plan monitoring | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_track | top | top | Selects which statements are tracked by pg_stat_monitor. | | | none, top, all | no
|
||||
pg_stat_monitor.pgsm_extract_comments | no | no | Enable/Disable extracting comments from queries. | | | yes, no | no
|
||||
pg_stat_monitor.pgsm_track_planning | no | no | Selects whether planning statistics are tracked. | | | yes, no | no
|
||||
(15 rows)
|
||||
|
||||
Drop extension pg_stat_monitor;
|
||||
|
||||
@@ -48,9 +48,9 @@ SELECT * from pg_stat_monitor_settings;
|
||||
SELECT query, calls, total_exec_time, min_exec_time, max_exec_time, mean_exec_time, stddev_exec_time from pg_stat_monitor;
|
||||
query | calls | total_exec_time | min_exec_time | max_exec_time | mean_exec_time | stddev_exec_time
|
||||
---------------------------------------------------------------------------------------------------------------------------+-------+-----------------+---------------+---------------+----------------+------------------
|
||||
SELECT * from pg_stat_monitor_settings | 2 | 0.0736 | 0.0341 | 0.0396 | 0.0368 | 0.0028
|
||||
SELECT query, calls, total_exec_time, min_exec_time, max_exec_time, mean_exec_time, stddev_exec_time from pg_stat_monitor | 1 | 0 | 0 | 0 | 0 | 0
|
||||
SELECT pg_stat_monitor_reset() | 1 | 0.03 | 0.03 | 0.03 | 0.03 | 0
|
||||
SELECT pg_stat_monitor_reset() | 1 | 0.0302 | 0.0302 | 0.0302 | 0.0302 | 0
|
||||
SELECT * from pg_stat_monitor_settings | 2 | 0.069 | 0.0342 | 0.0349 | 0.0345 | 0.0004
|
||||
(3 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
|
||||
Reference in New Issue
Block a user