Re: Why we don't want hints Was: Slow count(*) again...

Поиск
Список
Период
Сортировка
От Pierre C
Тема Re: Why we don't want hints Was: Slow count(*) again...
Дата
Msg-id op.vqqt8ihaeorkce@apollo13
обсуждение исходный текст
Ответ на Re: Why we don't want hints Was: Slow count(*) again...  (Tobias Brox <tobixen@gmail.com>)
Список pgsql-performance
>    select * from account_transaction where trans_type_id in ( ...
> long, hard-coded list ...) and account_id=? order by created desc
> limit 25;

You could use an index on (account_id, created, trans_type), in
replacement of your index on (account_id, created). This will not prevent
the "Index Scan Backwards", but at least, index rows with trans_type not
matching the WHERE clause will not generate any heap access...

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

Предыдущее
От: Cesar Arrieta
Дата:
Сообщение: Unblock tables
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Unblock tables