# HG changeset patch # User Oleksandr Gavenko # Date 1576009490 -7200 # Node ID 6f68472e27d90b85b6ade275c3ae7adc8d528d87 # Parent eddb9a8153b5e994ae7c3ca70168d03fd9ab406a pg_stat_statements diff -r eddb9a8153b5 -r 6f68472e27d9 postgres.rst --- a/postgres.rst Tue Dec 10 19:34:24 2019 +0200 +++ b/postgres.rst Tue Dec 10 22:24:50 2019 +0200 @@ -233,6 +233,13 @@ SELECT * FROM pg_stat_statements; + SELECT * FROM pg_stat_statements + ORDER BY calls DESC; + + SELECT * FROM pg_stat_statements + WHERE query LIKE '%some%' + ORDER BY calls DESC; + https://www.postgresql.org/docs/current/pgstatstatements.html ``pg_stat_statements``. https://www.postgresql.org/docs/current/indexes-examine.html