Re: [ADMIN] since when has pg_stat_user_indexes.idx_scan been counting?
От | Tomas Vondra |
---|---|
Тема | Re: [ADMIN] since when has pg_stat_user_indexes.idx_scan been counting? |
Дата | |
Msg-id | 4DCC4718.8000409@fuzzy.cz обсуждение исходный текст |
Ответ на | Re: [ADMIN] since when has pg_stat_user_indexes.idx_scan been counting? (Willy-Bas Loos <willybas@gmail.com>) |
Ответы |
Re: [ADMIN] since when has pg_stat_user_indexes.idx_scan
been counting?
|
Список | pgsql-performance |
Dne 12.5.2011 22:03, Willy-Bas Loos napsal(a): > Then, are the index scans counted in a memory variable and written at > analyze time? No, I believe raghu mixed two things - stats used by the planner and stats about access to the data (how many tuples were read using an index, etc.) Stats for the planner are stored in pg_class/pg_statistic/pg_stats catalogs and are updated by ANALYZE (either manual or automatic). This is what raghu refered to, but these stats are completely useless when looking for unused indexes. Stats about access to the data (index/seq scans, cache hit ratio etc.) are stored in pg_stat_* and pg_statio_* catalogs, and are updated after running each query. AFAIK it's not a synchronous process, but when a backend finishes a query, it sends the stats to the postmaster (and postmaster updates the catalogs). Tomas
В списке pgsql-performance по дате отправления: