mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
allpaths.c:find_join_paths(): compute_rel_size() shouldn't be called
for join-relations. Sizes already computed by prune_rel_paths():compute_joinrel_size(). joinrels.c: < if ( _use_right_sided_plans_ ) --- > if ( _use_right_sided_plans_ && > length (outer_rel->relids) > 1 ) - r_plans are useful when outer_rel is join-relation... It decreases the size of search space...
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.3 1997/05/20 10:37:26 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.4 1997/06/05 09:33:52 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -110,7 +110,8 @@ find_clause_joins(Query *root, Rel *outer_rel, List *joininfo_list)
|
||||
get_base_rel(root, lfirsti(other_rels)),
|
||||
joininfo);
|
||||
/* how about right-sided plan ? */
|
||||
if ( _use_right_sided_plans_ )
|
||||
if ( _use_right_sided_plans_ &&
|
||||
length (outer_rel->relids) > 1 )
|
||||
{
|
||||
if (rel != NULL)
|
||||
join_list = lappend(join_list, rel);
|
||||
|
||||
Reference in New Issue
Block a user