Re: timestamp for query in pg_stat_statements

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: timestamp for query in pg_stat_statements
Дата
Msg-id 20220306041709.7vsuheybkenysu7x@jrouhaud
обсуждение исходный текст
Ответ на timestamp for query in pg_stat_statements  (Zhihong Yu <zyu@yugabyte.com>)
Ответы Re: timestamp for query in pg_stat_statements  (Zhihong Yu <zyu@yugabyte.com>)
Список pgsql-hackers
On Sat, Mar 05, 2022 at 06:10:44PM -0800, Zhihong Yu wrote:
>
> Looking at pg_stat_statements, there doesn't seem to be timestamp column
> for when the underlying query is performed.
> Since the same query can be run multiple times, the absence of timestamp
> column makes finding the most recent invocation of the query difficult.
>
> Does it make sense to add such a column ?

I don't think it would be that helpful.  Why do you need to only know when the
last execution was, but no other details among every other cumulated counters?

You should consider using some other tools on top of pg_stat_statements (and
possibly other extensions) that performs snapshot regularly and can show you
all the details at the given frequency.



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

Предыдущее
От: Zhihong Yu
Дата:
Сообщение: timestamp for query in pg_stat_statements
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Allow async standbys wait for sync replication