Re: query planner does not canonicalize infix operators

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: query planner does not canonicalize infix operators
Дата
Msg-id 8619.1334503282@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: query planner does not canonicalize infix operators  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Looks like we're missing out some operator properties, like the neutral
> element and if the operator is transitive, commutative or associative. I
> think I remember us talking about how knowing about operators being
> associative would also help optimize a class of join problems.

We do understand, and use, transitivity for btree equality operators
(cf mergejoin planning, EquivalenceClasses, etc).  I have limited
enthusiasm for introducing a more general concept, because it seems like
doing anything with it would add a great deal more planning effort for
(typically) little reward.  I can imagine cases where, say, deducing
"a < c" from "a < b and b < c" would be helpful ... but they don't come
up in common queries.
        regards, tom lane


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: documentation bug - missing info about unpackaged control files for extension
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Clobbered parameter names via DECLARE in PL/PgSQL