CREATE EXTENSION pg_stat_monitor;
SELECT pg_stat_monitor_reset();
 pg_stat_monitor_reset 
-----------------------
 
(1 row)

SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_enable_query_plan';
                  name                  | setting | unit | context | vartype |       source       | min_val | max_val | enumvals | boot_val | reset_val | pending_restart 
----------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
 pg_stat_monitor.pgsm_enable_query_plan | on      |      | user    | bool    | configuration file |         |         |          | off      | on        | f
(1 row)

CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int);
INSERT INTO TBL_0(key, txt_0, value_0) VALUES('000000', '846930886', 1804289383);
SELECT key, txt_0, value_0 FROM TBL_0;
  key   |   txt_0   |  value_0   
--------+-----------+------------
 000000 | 846930886 | 1804289383
(1 row)

SELECT key, txt_0, value_0 FROM TBL_0;
  key   |   txt_0   |  value_0   
--------+-----------+------------
 000000 | 846930886 | 1804289383
(1 row)

UPDATE TBL_0 SET value_0 = 1681692777;
SELECT substr(query, 0,50) AS query, calls, query_plan FROM pg_stat_monitor ORDER BY query,calls;
                       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('00 |     1 | 
 SELECT key, txt_0, value_0 FROM TBL_0             |     2 | Seq Scan on tbl_0
 SELECT name, setting, unit, context, vartype, sou |     1 | Function Scan on pg_show_all_settings a                          +
                                                   |       |   Filter: (name = 'pg_stat_monitor.pgsm_enable_query_plan'::text)
 SELECT pg_stat_monitor_reset()                    |     1 | Result
 UPDATE TBL_0 SET value_0 = 1681692777             |     1 | 
(6 rows)

DROP TABLE TBL_0;
SELECT pg_stat_monitor_reset();
 pg_stat_monitor_reset 
-----------------------
 
(1 row)

SELECT name, setting, unit, context, vartype, source, min_val, max_val, enumvals, boot_val, reset_val, pending_restart FROM pg_settings WHERE name='pg_stat_monitor.pgsm_enable_query_plan';
                  name                  | setting | unit | context | vartype |       source       | min_val | max_val | enumvals | boot_val | reset_val | pending_restart 
----------------------------------------+---------+------+---------+---------+--------------------+---------+---------+----------+----------+-----------+-----------------
 pg_stat_monitor.pgsm_enable_query_plan | off     |      | user    | bool    | configuration file |         |         |          | off      | off       | f
(1 row)

CREATE TABLE TBL_0(key text primary key, txt_0 text, value_0 int);
INSERT INTO TBL_0(key, txt_0, value_0) VALUES('000000', '846930886', 1804289383);
SELECT key, txt_0, value_0 FROM TBL_0;
  key   |   txt_0   |  value_0   
--------+-----------+------------
 000000 | 846930886 | 1804289383
(1 row)

SELECT key, txt_0, value_0 FROM TBL_0;
  key   |   txt_0   |  value_0   
--------+-----------+------------
 000000 | 846930886 | 1804289383
(1 row)

UPDATE TBL_0 SET value_0 = 1681692777;
SELECT substr(query, 0,50) AS query, calls, query_plan FROM pg_stat_monitor ORDER BY query,calls;
                       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('00 |     1 | 
 SELECT key, txt_0, value_0 FROM TBL_0             |     2 | 
 SELECT name, setting, unit, context, vartype, sou |     1 | 
 SELECT pg_stat_monitor_reset()                    |     1 | 
 UPDATE TBL_0 SET value_0 = 1681692777             |     1 | 
(6 rows)

DROP EXTENSION pg_stat_monitor;
