Re: Improving NOT IN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Improving NOT IN
Дата
Msg-id 13113.1170198371@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Improving NOT IN  ("Simon Riggs" <simon@2ndquadrant.com>)
Ответы Re: Improving NOT IN  ("Simon Riggs" <simon@2ndquadrant.com>)
Список pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.com> writes:
> On Tue, 2007-01-30 at 17:34 -0500, Tom Lane wrote:
>> Since that is unlikely to be the case, I can't see that this is worth
>> implementing...

> Integers are typically used as keys...

Yeah, in the form of sequences, so you have a hole for every failed
insert.  If the key isn't coming from a sequence then there's still
not any very good reason to suppose it's exactly contiguous.  People
do delete entries.

> What would be wrong with checking for a NOT NULL constraint? Thats how
> other planners cope with it. Or are you thinking about lack of plan
> invalidation?

Yup, without that, depending on constraints for plan correctness is
pretty risky.

Basically what I see here is a whole lot of work and new executor
infrastructure for something that will be a win in a very narrow
use-case and a significant loss the rest of the time.  I think there
are more productive ways to spend our development effort.
        regards, tom lane


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

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: Improving NOT IN
Следующее
От: "Simon Riggs"
Дата:
Сообщение: Re: Improving NOT IN