Difference between revisions of "Pg stat statements module"

From wikieduonline
Jump to navigation Jump to search
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
<code>[[pg_stat_statements]]</code>
+
<code>[[pg_stat_statements]]</code> <ref>https://www.postgresql.org/docs/current/pgstatstatements.html</ref> [[module]]
  
https://www.postgresql.org/docs/14/pgstatstatements.html
 
  
 
  [[SELECT]] queryid, query from pg_stat_statements where query like 'YOUR_QUERY_GOES_HERE'
 
  [[SELECT]] queryid, query from pg_stat_statements where query like 'YOUR_QUERY_GOES_HERE'
 +
 +
[[CREATE EXTENSION pg_stat_statements]];
  
 
  [[CREATE EXTENSION]] IF NOT EXISTS pg_stat_statements WITH SCHEMA public;
 
  [[CREATE EXTENSION]] IF NOT EXISTS pg_stat_statements WITH SCHEMA public;
  
  relation pg_stat_statements does not exist at character 18
+
From timescale documentation:
 +
  [[CREATE EXTENSION]] IF NOT EXISTS pg_stat_statements VERSION '1.10' CASCADE;
 +
 
 +
ERROR: relation pg_stat_statements does not exist at character 18
  
 
== Related ==
 
== Related ==
 
* <code>[[pg_stat]]</code>
 
* <code>[[pg_stat]]</code>
 +
* [[PostgreSQL list extensions]]: <code>[[\dx]]</code>
 +
* [[PostgreSQL modules]]
 +
* <code>[[pg_read_all_stats]]</code>
 +
* <code>[[pgbench]]</code>
 +
* [[TimescaleDB: pg_stat_statements]]
 +
* [[Amazon RDS Performance Insights]]
  
 
== See also ==
 
== See also ==
 
* {{pg_stat}}
 
* {{pg_stat}}
* {{PostgreSQL}}
+
* {{PostgreSQL extensions}}
  
 
[[Category:PostgreSQL]]
 
[[Category:PostgreSQL]]

Latest revision as of 08:12, 31 August 2023

pg_stat_statements [1] module


SELECT queryid, query from pg_stat_statements where query like 'YOUR_QUERY_GOES_HERE'
CREATE EXTENSION pg_stat_statements;
CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA public;

From timescale documentation:

CREATE EXTENSION IF NOT EXISTS pg_stat_statements VERSION '1.10' CASCADE;
ERROR: relation pg_stat_statements does not exist at character 18

Related[edit]

See also[edit]

  • https://www.postgresql.org/docs/current/pgstatstatements.html
  • Advertising: