Re: What is the right way to deal with a table with rows that are not in a random order?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What is the right way to deal with a table with rows that are not in a random order?
Дата
Msg-id 8057.1243521032@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: What is the right way to deal with a table with rows that are not in a random order?  (Douglas Alan <darkwater42@gmail.com>)
Список pgsql-general
Douglas Alan <darkwater42@gmail.com> writes:
> As I said, in my original post, Postgres's approach would be completely
> reasonable in this case,* if* the rows that it was looking for were
> sprinkled randomly throughout the table.  But they're *not* in this case --
> they're all at the end.

There's been some talk of penalizing the seqscan+limit combination
(perhaps by increasing the estimated start cost for the seqscan) if
the WHERE clause involves any variables that have a correlation stat
significantly different from zero.  But nobody's done the legwork
to see if this would really be useful or what an appropriate penalty
curve might be.

            regards, tom lane

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: ubuntu 9.04 and auto-start
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: What is the right way to deal with a table with rows that are not in a random order?