Re: Equivalence Rules

Поиск
Список
Период
Сортировка
От Antonin Houska
Тема Re: Equivalence Rules
Дата
Msg-id 5313163F.50807@gmail.com
обсуждение исходный текст
Ответ на Equivalence Rules  (Ali Piroozi <falipiroozi@gmail.com>)
Список pgsql-hackers
There are 2 kinds of rules in this document: for joins and for set
operations.

As for joins, I think they are all about *inner* joins. Postgres (IMO)
"implements" them by not doing anything special if query only contains
inner joins.

On the other hand, attention has to be paid if there's at least one
*outer* join in the query. Identities summarized in 'Valid OUTER JOIN
Optimizations' section of optimizer/README come into play then. I think
make_outerjoininfo() is the code to recognize these relationships in the
original query, and join_is_legal() then to check if new joins (those
not present in the original query) do not change the semantics.

(As for set operations, someone else needs to explain.)

// Antonin Houska (Tony)


On 03/02/2014 09:02 AM, Ali Piroozi wrote:
> Hi
> 
> My question is:
> Does PostgreSQL implements equivalence rules(from those are listed in
> email's attachment)?
> Which function or which part of source code(in PostgreSQL ) implements
> the equivalence rules?
> I think, this should be implemented in query optimization part of
> PostgreSQL, but which rule
> and where, I don't know?
> I want to use that(function or part of source code), to produce the
> equivalence Relational Algebras (based on equivalence rules in
> attachment) for a given SQL query(Relational Algebra).
> 
> Thanks
> 
> 
> 
> 




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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Fwd: patch: make_timestamp function
Следующее
От: Tan Tran
Дата:
Сообщение: Re: GSoC 2014 - mentors, students and admins