Re: Regarding Sequential Scans count increase each time we press refresh .

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Regarding Sequential Scans count increase each time we press refresh .
Дата
Msg-id 7885.1254079033@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Regarding Sequential Scans count increase each time we press refresh .  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Sep 24, 2009 at 8:25 PM, Josh Berkus <josh@agliodbs.com> wrote:
>> You can't "turn off" sequential scans. �You can only make the planner
>> less likely to choose them. �But if there's no way to get the data you
>> need other than a seqscan, it's still going to do one.

> And that's not a bad thing.  For a very small table, it's often the
> fastest method.

Probably more to the point: if the query involves fetching the whole
table, it's *always* the fastest method.  (Except maybe if you want
the results sorted, and often it's the fastest way even so.)  Indexes
are not a panacea.

            regards, tom lane

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Slow query after upgrade to 8.4
Следующее
От: Kouber Saparev
Дата:
Сообщение: LIMIT confuses the planner (again)