Re: [HACKERS] How does postgres store the join predicate for arelation in a given query

Поиск
Список
Период
Сортировка
От Gourav Kumar
Тема Re: [HACKERS] How does postgres store the join predicate for arelation in a given query
Дата
Msg-id CAPzqDmjAyRG_sGRZFHjKCnVXomZEwjcdn65g7TTWtwF30JCL+w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] How does postgres store the join predicate for a relation in a given query  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] How does postgres store the join predicate for arelation in a given query  (Gourav Kumar <gourav1905@gmail.com>)
Re: [HACKERS] How does postgres store the join predicate for a relation in a given query  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
My objective is to construct join graph from a given query.
A join graph, has a node for each relation involved in a join, and an edge between two relations if they share a join predicate among them.

To do this I first tried to use the make_join_rel() function
     - There I checked if they root->join->cur->level is 2, just write the relation names to a file.
     - But this strategy failed, because if there is somewhere a Cartesian product among two relations, then they can't have an edge in the join graph.
     - So, along with writing the relation name, I need to know if they share a join predicate among them or not.
 

On 12 October 2017 at 22:08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Gourav Kumar <gourav1905@gmail.com> writes:
> I have the RelOptInfo data structure for the relations which are to be
> joined but when I check their joininfo, it is empty.

You aren't telling us anything much about the case you're studying,
but if the join clauses have the form of equality comparisons, they
likely got converted into EquivalenceClass data structures instead.
These days the joininfo lists only contain "unstructured" join
conditions.

                        regards, tom lane



--
Thanks,
Gourav Kumar
Computer Science and Automation
Indian Institute of Science

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] [COMMITTERS] pgsql: Add port/strnlen support to libpq and ecpg Makefiles.
Следующее
От: Gourav Kumar
Дата:
Сообщение: Re: [HACKERS] How does postgres store the join predicate for arelation in a given query