View statistics_top_ten_rows_returned_queries

Top ten queries by rows returned.

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.
rows bigint This is the count of the effected rows by this query.
query text This is the SQL source of the query.

Example

SELECT *
FROM statistics_top_ten_rows_returned_queries;
rolename database_name rows query
stefanie stefanie 4849 SELECT t.oid, t.* , c.relkind, format_type(nullif(t.typbasetype, $1), t.typtypmod) as base_type_name, d.description FROM pg_catalog.pg_type t LEFT OUTER JOIN pg_catalog.pg_class c ON c.oid=t.typrelid LEFT OUTER JOIN pg_catalog.pg_description d ON t.oid=d.objoid WHERE t.typname IS NOT NULL
stefanie pgsql_tweaks_test 2558 SELECT t.oid,t.*,c.relkind,format_type(nullif(t.typbasetype, $1), t.typtypmod) as base_type_name, d.description FROM pg_catalog.pg_type t LEFT OUTER JOIN pg_catalog.pg_class c ON c.oid=t.typrelid LEFT OUTER JOIN pg_catalog.pg_description d ON t.oid=d.objoid WHERE t.typname IS NOT NULL