Re: index use again and again

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index use again and again
Дата
Msg-id 21796.1013529275@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: index use again and again  (Holger Marzen <holger@marzen.de>)
Список pgsql-general
Holger Marzen <holger@marzen.de> writes:
> You're right. When the result is small, the index is used. When the
> number of rows is a little bit higher and postgres uses a table scan,
> the query is much slower. The table is not very unordered. Can I force
> postgres to raise the limit where it starts scanning the whole table?

Not directly.  There is code in 7.2 to try to take account of the
effects of table ordering, but it probably needs to be improved.
See cost_index in costsize.c if you are interested.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Index on timestamp field, and now()
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Function to Pivot data