Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 80EB247621A for ; Thu, 16 Jan 2003 05:40:21 -0500 (EST) Received: from filer (12-235-198-106.client.attbi.com [12.235.198.106]) by postgresql.org (Postfix) with ESMTP id DF1DF47618E for ; Thu, 16 Jan 2003 05:40:20 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) (uid 1000) by filer with local; Thu, 16 Jan 2003 02:40:26 -0800 Date: Thu, 16 Jan 2003 02:40:25 -0800 From: Kevin Brown To: pgsql-performance@postgresql.org Subject: Re: 7.3.1 New install, large queries are slow Message-ID: <20030116104025.GB29781@filer> Mail-Followup-To: Kevin Brown , pgsql-performance@postgresql.org References: <9B1C77393DED0D4B9DAA1AA1742942DA0E4BFD@pos_pdc.posportal.com> <11547.1042691700@sss.pgh.pa.us> <20030116044847.GA29781@filer> <11770.1042693672@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <11770.1042693672@sss.pgh.pa.us> User-Agent: Mutt/1.4i Organization: Frobozzco International X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/137 X-Sequence-Number: 784 Tom Lane wrote: > Kevin Brown writes: > > Tom Lane wrote: > >> ... Whether this is a bug or a feature depends on > >> your point of view --- but there are folks out there who find it to be > >> a life-saver. > > > Since it *does* depend on one's point of view, would it be possible to > > have control over this implemented in a session-defined variable (with > > the default in the GUC, of course)? > > I have no objection to doing that --- anyone care to contribute code to > make it happen? (I think the trick would be to fold plain-JOIN jointree > entries into FROM-list items in planner.c, somewhere near the code that > hoists sub-SELECTs into the main join tree. But I haven't tried it, and > have no time to in the near future.) I'm looking at the code now (the 7.2.3 code in particular, but I suspect for this purpose the code is likely to be very similar to the CVS tip), but it's all completely new to me and the developer documentation isn't very revealing of the internals. The optimizer code (I've been looking especially at make_jointree_rel() and make_fromexpr_rel()) looks a bit tricky...it'll take me some time to completely wrap my brain around it. Any pointers to revealing documentation would be quite helpful! -- Kevin Brown kevin@sysexperts.com