238 |
238 |
239 SELECT * FROM pg_stat_statements |
239 SELECT * FROM pg_stat_statements |
240 WHERE query LIKE '%some%' |
240 WHERE query LIKE '%some%' |
241 ORDER BY calls DESC; |
241 ORDER BY calls DESC; |
242 |
242 |
243 Reveal execution details:: |
|
244 |
|
245 EXPLAIN ANALYSE SELECT 1; |
|
246 EXPLAIN (TIMING false, COSTS false, ANALYSE) SELECT 1; |
|
247 EXPLAIN (TIMING false, COSTS false, BUFFERS false, VERBOSE false, ANALYSE) SELECT 1; |
|
248 |
|
249 https://www.postgresql.org/docs/current/pgstatstatements.html |
243 https://www.postgresql.org/docs/current/pgstatstatements.html |
250 ``pg_stat_statements``. |
244 ``pg_stat_statements``. |
251 https://www.postgresql.org/docs/current/indexes-examine.html |
245 https://www.postgresql.org/docs/current/indexes-examine.html |
252 Examining Index Usage. |
246 Examining Index Usage. |
|
247 |
|
248 Reveal execution details:: |
|
249 |
|
250 EXPLAIN ANALYSE SELECT 1; |
|
251 EXPLAIN (TIMING false, COSTS false, ANALYSE) SELECT 1; |
|
252 EXPLAIN (TIMING false, COSTS false, BUFFERS false, VERBOSE false, ANALYSE) SELECT 1; |
|
253 |
|
254 https://www.postgresql.org/docs/11/sql-explain.html |
|
255 ``EXPLAIN``. |
253 |
256 |
254 List databases, schemas and tables |
257 List databases, schemas and tables |
255 ================================== |
258 ================================== |
256 |
259 |
257 Default database is ``postgres``. |
260 Default database is ``postgres``. |