From: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com> |
---|---|
To: | 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Improving our clauseless-join heuristics |
Date: | 2012-04-16 03:48:33 |
Message-ID: | 004201cd1b83$cc729720$6557c560$%kapila@huawei.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>> That case is handled by make_rels_by_clauseless_joins
It will be handled by make_rels_by_clauseless_joins() if given rel old_rel
doesn't have any join clause.
However if it has join clause but doesn't able to join with any other rels
like in the example you have provided for relation c, it is not able to join
with other rel d.
In such cases it can do cross-join with d, because it has not found any
relation to join with.
Doesn't it will address the problem you mentioned?
-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, April 16, 2012 9:10 AM
To: Amit Kapila
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Improving our clauseless-join heuristics
Amit Kapila <amit(dot)kapila(at)huawei(dot)com> writes:
> I want to clarify small doubt in this regard.
> In function make_rels_by_clause_joins(..), it tries to join the given
> relation old_rel with other relations if there exist a join between them.
> What I can understand is, it is because if there exists a join condition
its
> better to join with that relation.
> However if the given relation old_rel is not able to join any relation,
then
> why can't it try to make cross-join with other relations there itself.
Hm? That case is handled by make_rels_by_clauseless_joins. I suppose
we could refactor to combine those two functions, but what's the point?
If that's not what your question is about, then I don't understand.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Boszormenyi Zoltan | 2012-04-16 04:24:57 | Re: ECPG FETCH readahead |
Previous Message | Tom Lane | 2012-04-16 03:39:54 | Re: Improving our clauseless-join heuristics |