mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
PG-186: Add support to monitor query execution plan.
This requires refactoring of code to add this functionality. Along with that this patch contains regression test cases.
This commit is contained in:
19
regression/sql/rows.sql
Normal file
19
regression/sql/rows.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
CREATE EXTENSION pg_stat_monitor;
|
||||
|
||||
CREATE TABLE t1(a int);
|
||||
CREATE TABLE t2(b int);
|
||||
INSERT INTO t1 VALUES(generate_series(1,1000));
|
||||
INSERT INTO t2 VALUES(generate_series(1,5000));
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
|
||||
SELECT * FROM t1 LIMIT 10;
|
||||
SELECt * FROM t2 WHERE b % 2 = 0;
|
||||
|
||||
SELECT query, rows FROM pg_stat_monitor ORDER BY query COLLATE "C";
|
||||
SELECT pg_stat_monitor_reset();
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP EXTENSION pg_stat_monitor;
|
||||
Reference in New Issue
Block a user