New SQL counter statistics view (pg_stat_sql)

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема New SQL counter statistics view (pg_stat_sql)
Дата
Msg-id CAJrrPGeY4xujjoR=z=KoyRMHEK_pSjjp=7VBhOAHq9rfgpV7QQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: New SQL counter statistics view (pg_stat_sql)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: dsm_unpin_segment
Следующее
От: Haribabu Kommi
Дата:
Сообщение: Re: Any need of GRANT/REVOKE CREATE TABLE | POLICY | ETC