1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +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

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_pool.c,v 1.17 2000/01/26 05:56:33 momjian Exp $
* $Id: geqo_pool.c,v 1.18 2000/09/19 18:42:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -84,18 +84,18 @@ free_pool(Pool *pool)
* initialize genetic pool
*/
void
random_init_pool(Query *root, Pool *pool, int strt, int stp)
random_init_pool(Query *root, List *initial_rels,
Pool *pool, int strt, int stp)
{
Chromosome *chromo = (Chromosome *) pool->data;
int i;
for (i = strt; i < stp; i++)
{
init_tour(chromo[i].string, pool->string_length); /* from
* "geqo_recombination.c"
* */
pool->data[i].worth = geqo_eval(root, chromo[i].string, pool->string_length); /* "from geqo_eval.c" */
init_tour(chromo[i].string, pool->string_length);
pool->data[i].worth = geqo_eval(root, initial_rels,
chromo[i].string,
pool->string_length);
}
}