Skip site navigation (1) Skip section navigation (2)

Re: Optimizer hook

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Julius Stroffek <Julius(dot)Stroffek(at)Sun(dot)COM>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Optimizer hook
Date: 2007-09-23 20:48:10
Message-ID: 8756.1190580490@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Julius Stroffek <Julius(dot)Stroffek(at)Sun(dot)COM> writes:
> I rewrote a patch a bit.

This hook seems very strangely defined to me.  Why did you not put the
hook at the point where the current geqo-vs-regular decision is made?
I do not see the value of duplicating the joinlist-expansion logic,
which is what you're going to have to do if you use a hook that replaces
make_rel_from_joinlist.  The only things you could do differently than
it does would be (1) be smarter about full outer joins, which was not
part of the agenda that I heard of, or (2) willfully disregard the
user's from_collapse_limit and join_collapse_limit settings, which
doesn't seem like an amazingly good idea either.

Also, "optimizer_hook" seems nearly content-free as a name for use
in this area; I see no reason why the particular sub-section of the
planner we're discussing here has more title to that name than other
parts.  Something like "join_order_search_hook" might be more
appropriate.

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2007-09-23 21:38:40
Subject: Re: XML binary I/O (was Re: tsearch refactorings)
Previous:From: Andrew DunstanDate: 2007-09-23 20:33:28
Subject: Re: [PATCHES] msvc, build and install with cygwin in the PATH

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group