Re: missing optimization - column <> column

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Re: missing optimization - column <> column
Дата
Msg-id CADkLM=ciBNo8Q2adv6VJBAX_2SHGd3pbggKaeFKnsM730mCZDw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: missing optimization - column <> column  (Pantelis Theodosiou <ypercube@gmail.com>)
Ответы Re: missing optimization - column <> column  (Pantelis Theodosiou <ypercube@gmail.com>)
Список pgsql-hackers

Would it be worth replacing the condition with the equivalent?
I mean would that help optimizing better some queries when it knows that a is (not) nullable or when "a" is more complicated expression?

a <> a    :   (a IS NULL) AND NULL
a = a     :   (a IS NOT NULL) OR NULL


I think you're looking for

a IS DISTINCT FROM a 

And that will work for cases where a might be null.

I have no opinion about whether adding such a test to the planner is worth it.

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

Предыдущее
От: Mithun Cy
Дата:
Сообщение: Re: Patch: Implement failover on libpq connect level.
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Introduce dynamic shared memory areas.