Re: [GENERAL] select query takes 13 seconds to run with index

Поиск
Список
Период
Сортировка
От PFC
Тема Re: [GENERAL] select query takes 13 seconds to run with index
Дата
Msg-id op.ubsz2zqmcigqcu@apollo13.peufeu.com
обсуждение исходный текст
Ответ на Re: [GENERAL] select query takes 13 seconds to run with index  (mark <markkicks@gmail.com>)
Список pgsql-performance
>> The estimate is way off, when was the last time Vaccum was on the table?
> about a week ago i ran this VACUUM VERBOSE ANALYZE;
> this table is never updated or deleted, rows are just inserted...

    You should analyze it more often, then... Postgres probably thinks the
table has the same data distribution as last week !
    Analyze just takes a couple seconds...

>> Load on the database
> how do i measure load on database?

    Just look at vmstat.

    Also if you very often do SELECT .. WHERE x = ... ORDER BY id DESC you'll
benefit from an index on (x,id) instead of just (x).



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

Предыдущее
От: mark
Дата:
Сообщение: Re: [GENERAL] select query takes 13 seconds to run with index
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: [GENERAL] select query takes 13 seconds to run with index