Re: How to interpret this explain analyse?

Поиск
Список
Период
Сортировка
От Kevin Brown
Тема Re: How to interpret this explain analyse?
Дата
Msg-id 20050216210928.GB31014@filer
обсуждение исходный текст
Ответ на Re: How to interpret this explain analyse?  (Greg Stark <gsstark@mit.edu>)
Список pgsql-performance
Greg Stark wrote:
>
> Kevin Brown <kevin@sysexperts.com> writes:
> > Also, one has to ask what the consequences are of assuming a value too
> > low versus too high.  Which ends up being worse?
>
> This is one of the things the planner really cannot know. Ultimately it's the
> kind of thing for which hints really are necessary. Oracle distinguishes
> between the "minimize total time" versus "minimize startup time" with
> /*+ ALL_ROWS */ and /*+ FIRST_ROWS */ hints, for example.

Well, the planner *can* know the actual value to use in this case, or
at least a close approximation, but the system would have to gather
some information about cursors during fetches.  At the very least, it
will know how many rows were actually fetched by the cursor in
question, and it will also hopefully know how many rows were returned
by the query being executed.  Store the ratio of the two in a list,
then store the list itself into a table (or something) at backend exit
time.


--
Kevin Brown                          kevin@sysexperts.com

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

Предыдущее
От: "lcham02"
Дата:
Сообщение: disagreeing query planners
Следующее
От: Ron Mayer
Дата:
Сообщение: Re: seq scan cache vs. index cache smackdown