Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3ef1879

Browse files
committed
Fix an error in make_outerjoininfo introduced by my patch of 30-Aug: the code
neglected to test whether an outer join's join-condition actually refers tothe lower outer join it is looking at. (The comment correctly described whatwas supposed to happen, but the code didn't do it...) This often resulted inadding an unnecessary constraint on the join order of the two outer joins,which was bad enough. However, it also seems to expose a performanceproblem in an older patch (from 15-Feb): once we've decided that there is ajoin ordering constraint, we will start trying clauseless joins between everycombination of rels within the constraint, which pointlessly eats up lots oftime and space if there are numerous rels below the outer join. That probablyneeds to be revisited :-(. Per gripe from Jakub Ouhrabka.
1 parent5c4249c commit3ef1879

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/optimizer/plan/initsplan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/optimizer/plan/initsplan.c,v 1.134 2007/10/04 20:44:47 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/plan/initsplan.c,v 1.135 2007/10/24 20:54:27 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -623,6 +623,7 @@ make_outerjoininfo(PlannerInfo *root,
623623
* rel in the lower OJ's min_righthand, not its whole syn_righthand.
624624
*/
625625
if (bms_overlap(left_rels,otherinfo->syn_righthand)&&
626+
bms_overlap(clause_relids,otherinfo->syn_righthand)&&
626627
!bms_overlap(strict_relids,otherinfo->min_righthand))
627628
{
628629
min_lefthand=bms_add_members(min_lefthand,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp