On Wed, May 25, 2011 at 1:37 PM, Hitoshi Harada <umi.tan...@gmail.com> wrote: >> How do you decide whether or not to push down? > > Yeah, that's the problem. In addition to the conditions of join-qual > == grouping key && outer is unique on qual, we need some criteria if > it should be done. At first I started to think I can compare cost of > two different plan nodes, which are generated by calling > subquery_planner() twice. But now my plan is to apply some heuristics > like that join qual selectivity is less than 10% or so. I either don't > like magic numbers but given Query restructuring instead of > PlannerInfo (which means we cannot use Path) it is only left way. To > get it work is my first goal anyway.
I think getting it working is probably a good first goal. I am not really sure that we want to commit it that way, and I think my vote would be for you to work on the approach we discussed before rather than this one, but it's your project, and I think you'll probably learn enough in getting it working that it will be a step forward in any case. The planner is complex enough that it's worth trying to get something that works, first, before trying to make it perfect. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers