Re: Unused indexes - PostgreSQL 9.2

Поиск
Список
Период
Сортировка
От Melvin Davidson
Тема Re: Unused indexes - PostgreSQL 9.2
Дата
Msg-id CANu8FiyBjEpKPkJaeVv=gy-j3BZyDe7xbcL35nqNsCWwrZU4NA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Unused indexes - PostgreSQL 9.2  (Lucas Possamai <drum.lucas@gmail.com>)
Ответы Re: Unused indexes - PostgreSQL 9.2  (Lucas Possamai <drum.lucas@gmail.com>)
Re: Unused indexes - PostgreSQL 9.2  (Lucas Possamai <drum.lucas@gmail.com>)
Список pgsql-general


On Tue, May 10, 2016 at 5:23 PM, Lucas Possamai <drum.lucas@gmail.com> wrote:


>Some time ago I changed the pg_stat_temp directory from /var/lib/pgsq/whatever to /tmp
Have you checked the postgres log to see if there are any errors about it not being able to write to the pg_stat_temp dir?


Yep.... no errors =\ 

And what happens if you run this query?

SELECT idstat.schemaname AS schema,
       idstat.relname AS table_name,
       indexrelname AS index_name,
       idstat.idx_scan AS times_used,
       pg_size_pretty(pg_relation_size(quote_ident(idstat.schemaname) || '.' || quote_ident(idstat.relname))) AS table_size,
       pg_size_pretty(pg_relation_size(quote_ident(idstat.schemaname) || '.' || quote_ident(indexrelname))) AS index_size,
       n_tup_upd + n_tup_ins + n_tup_del as num_writes,
       indexdef AS definition
FROM pg_stat_user_indexes AS idstat
JOIN pg_indexes ON indexrelname = indexname
JOIN pg_stat_user_tables AS tabstat ON idstat.relname = tabstat.relname
WHERE indexrelname = ' {YOUR QUERY NAME } ';


--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

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

Предыдущее
От: Lucas Possamai
Дата:
Сообщение: Re: Unused indexes - PostgreSQL 9.2
Следующее
От: Lucas Possamai
Дата:
Сообщение: Re: Unused indexes - PostgreSQL 9.2