Re: [HACKERS] Re: [PORTS] GEQO broken on 6-6-97?!? - Mailing list pgsql-hackers

From aixssd!darrenk@abs.net (Darren King)
Subject Re: [HACKERS] Re: [PORTS] GEQO broken on 6-6-97?!?
Date
Msg-id 862aefb3f96ab662bb0dff85f89cc110
Whole thread Raw
In response to [HACKERS] Re: [PORTS] GEQO broken on 6-6-97?!?  ("Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>)
List pgsql-hackers
> Thanks for help, Darren! I hope that cause found now:
> compute_joinrel_size() shouldn't be called for non-JoinPath path!
> In old opt-r we have:
>
>         if (IsA_JoinPath(cheapest))
>             {
>                 rel->size = compute_joinrel_size(cheapest);
>             }
>         else
>             elog(WARN, "non JoinPath called");
>
> - so I changed geqo_rel_paths():
>
>     cheapest = (JoinPath*)set_paths(rel, path);
>     if ( IsA_JoinPath (cheapest) )
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>         rel->size = compute_joinrel_size(cheapest);
>
>     else - does nothing!
>
> In this case compute_rel_size() in gimme_tree() will be called
> (I added if ( new_rel->size <= 0 ) there yesterday).

Fixes geqo for my test data.  Will test some more cases when I get
time, but this appears to have nailed the optimizer problem.


Darren   darrenk@insightdist.com

------------------------------

pgsql-hackers by date:

Previous
From: Raymond Toy
Date:
Subject: [HACKERS] SQL lo_unlink function?
Next
From: Bruce Momjian
Date:
Subject: [HACKERS] Re: [QUESTIONS] Reliability?