Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 765089F98D5 for ; Mon, 13 Aug 2007 18:23:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 70683-06 for ; Mon, 13 Aug 2007 18:23:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 509A79F98B8 for ; Mon, 13 Aug 2007 18:23:25 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l7DLNNJK022246; Mon, 13 Aug 2007 17:23:23 -0400 (EDT) To: Stefan Kaltenbrunner cc: Julius Stroffek , pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Proposal: Pluggable Optimizer Interface In-reply-to: <46C0BD13.107@kaltenbrunner.cc> References: <46C0B5E4.4020305@sun.com> <46C0BD13.107@kaltenbrunner.cc> Comments: In-reply-to Stefan Kaltenbrunner message dated "Mon, 13 Aug 2007 22:20:35 +0200" Date: Mon, 13 Aug 2007 17:23:23 -0400 Message-ID: <22245.1187040203@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/141 X-Sequence-Number: 26271 Stefan Kaltenbrunner writes: > Julius Stroffek wrote: >> There is a proposal attached to this mail about the interface >> we would like to implement for switching between different >> optimizers. Please review it and provide a feedback to us. > hmm - how does is that proposal different from what got implemented with: > http://archives.postgresql.org/pgsql-committers/2007-05/msg00315.php Well, it's a very different level of abstraction. The planner_hook would allow you to replace the *entire* planner, but if you only want to replace GEQO (that is, only substitute some other heuristics for partial search of a large join-order space), doing it from planner_hook will probably require duplicating a great deal of code. A hook right at the place where we currently choose "geqo or regular" would be a lot easier to experiment with. Replacing GEQO sounds like a fine area for investigation to me; I've always been dubious about whether it's doing a good job. But I'd prefer a simple hook function pointer designed in the same style as planner_hook (ie, intended to be overridden by a loadable module). The proposed addition of a system catalog and SQL-level management commands sounds like a great way to waste a lot of effort on mere decoration, before ever getting to the point of being able to demonstrate that there's any value in it. Also, while we might accept a small hook-function patch for 8.3, there's zero chance of any of that other stuff making it into this release cycle. regards, tom lane