This is a new statistics view that is used to provide the number of SQL operations that are happened on a particular interval of time. This view is useful for the system to find out the pattern of the operations that are happening in the instance during particular interval of time.
Following is the more or less columns and their details of the pg_stat_sql view. postgres=# \d pg_stat_sql View "pg_catalog.pg_stat_sql" Column | Type | Modifiers -------------+--------------------------+----------- selects | bigint | inserts | bigint | deletes | bigint | updates | bigint | declares | bigint | fetches | bigint | copies | bigint | reindexes | bigint | truncates | bigint | stats_reset | timestamp with time zone | The SQL counters gets updated only for the external SQL queries, not for the SQL queries that are generated internally. The counters gets updated at exec_simple_query and exec_execute_message functions. User can reset the SQL counter statistics using an exposed function. The Stats collection can be turned on/off using a GUC also. Any comments/objections in providing a patch for the same? Regards, Hari Babu Fujitsu Australia -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers