Re: query optimiser changes 6.5->7.0

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: query optimiser changes 6.5->7.0
Дата
Msg-id 13821.959924410@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: query optimiser changes 6.5->7.0  (Joseph Shraibman <jks@selectacast.net>)
Список pgsql-general
Joseph Shraibman <jks@selectacast.net> writes:
> OK this may seem like a stupid question, but isn't index scan always
> better except for the pathalogical simple case where the work to be done
> is trivial anyway?

No.  If it were, the optimizer would be a whole lot simpler ;-)

In practice an indexscan only wins if it will visit a relatively
small percentage of the tuples in the table.  The $64 questions
are how small is small enough, and how can the optimizer guess
how many tuples will be hit in advance of doing the query...

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Vacuum Question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Vacuum Question