I've tested this under 7.3, and it works beautifully for the cases I've
built over the last 2 days. I can no longer bugger a plan up mearly
by reordering the WHERE clauses. Note that 2 of the five parts won't
patch in (involving constantqual). Looks to be code refactoring between
here and planmain.c on the 7.4 branch? I tried to hand-patch it in,
and gave up. it _seems_ to work without it, but I probably haven't
covered that codepath.
Ross
On Thu, Nov 14, 2002 at 01:33:05PM -0500, Tom Lane wrote:
> I said:
> > Well, we could define it as a bug ;-) --- that is, a performance regression.
> > I'd be happier about adding a dozen lines of code to sort quals by
> > whether or not they contain a subplan than about flip-flopping on the
> > original patch. That would actually solve the class of problem you
> > exhibited, whereas the other is just a band-aid that happens to work for
> > your particular example.
>
> The attached patch does the above. I think it's a very low-risk change,
> but am tossing it out on the list to see if anyone objects to applying
> it in the 7.3 branch. (I intend to put it in 7.4devel in any case.)
>
> regards, tom lane