Обсуждение: [PERFORM] since when has pg_stat_user_indexes.idx_scan been counting?

Поиск
Список
Период
Сортировка

[PERFORM] since when has pg_stat_user_indexes.idx_scan been counting?

От
Willy-Bas Loos
Дата:
Hi,

We have some indexes that don't seem to be used at all.
I'd like to know since when they have not been used.
That is, the time when postgres started counting to reach the number that is in pg_stat_user_indexes.idx_scan

Is there a way to retrieve that from the database ?

Cheers,

WBL

--
"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw

Re: [PERFORM] since when has pg_stat_user_indexes.idx_scan been counting?

От
raghu ram
Дата:


On Thu, May 12, 2011 at 9:09 PM, Willy-Bas Loos <willybas@gmail.com> wrote:
Hi,

We have some indexes that don't seem to be used at all.
I'd like to know since when they have not been used.
That is, the time when postgres started counting to reach the number that is in pg_stat_user_indexes.idx_scan

Is there a way to retrieve that from the database ?


"Analyze" activity will update the statistics of each catalog table.

pg_postmaster_start_time --> Retrieves the Postmaster [ PostgreSQL Instance] start time

postgres=# select pg_postmaster_start_time();

--Raghu Ram

Re: [PERFORM] since when has pg_stat_user_indexes.idx_scan been counting?

От
Willy-Bas Loos
Дата:
Then, are the index scans counted in a memory variable and written at analyze time?

On Thu, May 12, 2011 at 8:22 PM, raghu ram <raghuchennuru@gmail.com> wrote:

"Analyze" activity will update the statistics of each catalog table.
--Raghu Ram




--
"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw