Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan
Дата
Msg-id 5020.966884852@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan  (Hannu Krosing <hannu@tm.ee>)
Список pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
> Why is assuming a constant currval any more "invalid" than not doing so ?

Because it's wrong: it changes the behavior from what happens if the
optimizer does not do anything special with the function.

The fact that some cases involving currval+nextval (but not all) yield
unpredictable results is not an adequate argument for causing the
behavior of other cases to change.  Especially not when there's a
perfectly good way for you to make it do what you want...
        regards, tom lane


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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: Bug tracking (was Re: +/- Inf for float8's)
Следующее
От: Don Baccus
Дата:
Сообщение: Re: Bug tracking (was Re: +/- Inf for float8's)