View statistics_top_ten_called_queries
Top ten queries with high memory usage.
COUTION
The schema where the extension pg_stat_statements is installed has to be in the search_path of the user!
This view needs pg_stat_statements to be installed. When the extension is not installed, the view will not be installed by the extension.
Columns
| Column Name | datatype | Description |
|---|---|---|
| rolename | regrole | The role/user who executed the query. |
| database_name | name | The database name in which the query has been executed. |
| calls | bigint | This is many times a statement has been executed. |
| query | text | This is the SQL source of the query. |
Example
SELECT *
FROM statistics_top_ten_called_queries;
| rolename | database_name | calls | query |
|---|---|---|---|
| stefanie | stefanie | 44 | SET search_path = timetravel,public |
| stefanie | stefanie | 26 | SET extra_float_digits = 3 |
| stefanie | stefanie | 26 | SET application_name = ‘PostgreSQL JDBC Driver’ |