Re: Delete query takes exorbitant amount of time

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Delete query takes exorbitant amount of time
Дата
Msg-id 3340.1112117509@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Delete query takes exorbitant amount of time  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Delete query takes exorbitant amount of time
Список pgsql-performance
Simon Riggs <simon@2ndquadrant.com> writes:
> That implies to me that LIMIT queries are not considered correctly in
> the M&L formula and thus we are more likely to calculate a too-high cost
> for using an index in those circumstances....and thus more likely to
> SeqScan for medium sized relations?

You misunderstand how LIMIT is handled.  The plan structure is

    LIMIT ...
        regular plan ...

and so the strategy is to plan and cost the regular plan as though it
would be carried out in full, and then take an appropriate fraction
of that at the LIMIT stage.

            regards, tom lane

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Delete query takes exorbitant amount of time
Следующее
От: Greg Stark
Дата:
Сообщение: Re: How to improve db performance with $7K?