diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 6abf6e11b9e1c20ac94afb16a495fd41fb8eee45..ac1f2b414d929c3127c1e27f047fa5b3b9e786b7 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.6 1997/04/29 04:37:22 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.7 1997/06/01 02:55:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -173,7 +173,7 @@ find_join_paths(Query *root, List *outer_rels, int levels_left) * * *******************************************/ - if ( _use_geqo_ ) + if ( (_use_geqo_) || length(root->base_relation_list_) >= GEQO_RELS ) return lcons(geqo(root), NIL); /* returns *one* Rel, so lcons it */ /******************************************* diff --git a/src/include/optimizer/geqo.h b/src/include/optimizer/geqo.h index b25d443be0ad0bfac29445c0a505fde459e552dd..c046fbc21e711cc01a860c60235bcb2d6c1ecac2 100644 --- a/src/include/optimizer/geqo.h +++ b/src/include/optimizer/geqo.h @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo.h,v 1.1 1997/02/19 12:58:28 scrappy Exp $ + * $Id: geqo.h,v 1.2 1997/06/01 02:56:00 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -38,6 +38,8 @@ */ #define ERX +/* GEQO switch according to number of relations in a query */ +#define GEQO_RELS 7 /* genetic algorithm parameters */