1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Fix GEQO optimizer to work correctly with new outer-join-capable

query representation.  Note that GEQO_RELS setting is now interpreted
as the number of top-level items in the FROM list, not necessarily the
number of relations in the query.  This seems appropriate since we are
only doing join-path searching over the top-level items.
This commit is contained in:
Tom Lane
2000-09-19 18:42:34 +00:00
parent 457ac0331c
commit ba2ea6e0f5
6 changed files with 57 additions and 48 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.63 2000/09/12 21:06:52 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.64 2000/09/19 18:42:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -188,7 +188,7 @@ make_one_rel_by_joins(Query *root, int levels_needed, List *initial_rels)
* rest will be skipped in case of GEQO *
*******************************************/
if (enable_geqo && levels_needed >= geqo_rels)
return geqo(root);
return geqo(root, levels_needed, initial_rels);
/*
* We employ a simple "dynamic programming" algorithm: we first find