Re: Postgres index usage

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Re: Postgres index usage
Дата
Msg-id CAKAnmm+Ei+oeg_X_C=Mkn6amqaYsFVqOzNadKT5ZGiugyibmCg@mail.gmail.com
обсуждение исходный текст
Ответ на Postgres index usage  ("Dirschel, Steve" <steve.dirschel@thomsonreuters.com>)
Список pgsql-performance
On Wed, Aug 7, 2024 at 1:06 PM Dirschel, Steve <steve.dirschel@thomsonreuters.com> wrote:

I’ve found multiple postings out there saying you can query pg_stat_all_indexes and look at idx_scan to know if an index has been used by queries.  I want to be 100% sure I can rely on that table/column to know if an index has never been used.


Also make sure you check pg_stat_all_indexes on your replicas as well. Each has their own independent idx_scan counters. So while your primary is not using a particular index, one or more of your replicas might be.

Cheers,
Greg

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