From: Vadim B. Mikheev Date: Tue, 10 Jun 1997 07:53:55 +0000 (+0000) Subject: if ( new_rel->size <= 0 ) X-Git-Tag: REL6_1~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cbb4213af460c9112c2b74b3051809caac38322a;p=postgresql if ( new_rel->size <= 0 ) new_rel->size = compute_rel_size(new_rel); --- diff --git a/src/backend/optimizer/geqo/geqo_eval.c b/src/backend/optimizer/geqo/geqo_eval.c index ccaae3c37a..ebbc7f65cd 100644 --- a/src/backend/optimizer/geqo/geqo_eval.c +++ b/src/backend/optimizer/geqo/geqo_eval.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_eval.c,v 1.10 1997/06/06 03:18:02 vadim Exp $ + * $Id: geqo_eval.c,v 1.11 1997/06/10 07:53:53 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -157,9 +157,8 @@ gimme_tree (Query *root, Gene *tour, int rel_count, int num_gene, Rel *outer_rel geqo_rel_paths(new_rel); /* processing of other new_rel attributes */ -#if 0 /* compute_joinrel_size already called by geqo_rel_paths */ - new_rel->size = compute_rel_size(new_rel); -#endif + if ( new_rel->size <= 0 ) + new_rel->size = compute_rel_size(new_rel); new_rel->width = compute_rel_width(new_rel); root->join_relation_list_ = lcons(new_rel, NIL); diff --git a/src/backend/optimizer/geqo/geqo_paths.c b/src/backend/optimizer/geqo/geqo_paths.c index e388b0e827..3b5b4170c8 100644 --- a/src/backend/optimizer/geqo/geqo_paths.c +++ b/src/backend/optimizer/geqo/geqo_paths.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_paths.c,v 1.2 1997/02/19 14:52:06 scrappy Exp $ + * $Id: geqo_paths.c,v 1.3 1997/06/10 07:53:55 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -102,16 +102,17 @@ geqo_rel_paths(Rel *rel) Path *path = (Path*)NULL; JoinPath *cheapest = (JoinPath*)NULL; - foreach(y, rel->pathlist) { - path = (Path*)lfirst(y); + rel->size = 0; + foreach(y, rel->pathlist) + { + path = (Path*)lfirst(y); - if(!path->p_ordering.ord.sortop) { + if(!path->p_ordering.ord.sortop) break; - } - } + } - cheapest = (JoinPath*)set_paths(rel, path); - rel->size = compute_joinrel_size(cheapest); + cheapest = (JoinPath*)set_paths(rel, path); + rel->size = compute_joinrel_size(cheapest); }