Re: index stat

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: index stat
Дата
Msg-id 4731942E.EE98.0025.0@wicourts.gov
обсуждение исходный текст
Ответ на index stat  ("Campbell, Lance" <lance@uiuc.edu>)
Список pgsql-performance
>>> On Mon, Nov 5, 2007 at 10:42 AM, in message
<B10E6810AC2A2F4EA7550D072CDE8760197DD5@SAB-FENWICK.sab.uiuc.edu>, "Campbell,
Lance" <lance@uiuc.edu> wrote:

> How can I [. . .] get rid of some unnecessary indexes

Here's what I periodically run to look for unused indexes:

select relname, indexrelname
  from pg_stat_user_indexes
  where indexrelname not like '%_pkey'
    and idx_scan = 0
  order by relname, indexrelname
;

We omit the primary keys from the list (based on our naming
convention) because they are needed to ensure integrity.

-Kevin




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

Предыдущее
От: "Guillaume Smet"
Дата:
Сообщение: Re: Estimation problem with a LIKE clause containing a /
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Estimation problem with a LIKE clause containing a /