Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 878909FA376 for ; Tue, 10 Oct 2006 11:21:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 20283-06 for ; Tue, 10 Oct 2006 14:21:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 974EE9F9FB1 for ; Tue, 10 Oct 2006 11:21:04 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 76B5556437; Tue, 10 Oct 2006 09:21:03 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 10 Oct 2006 09:21:02 -0500 Date: Tue, 10 Oct 2006 09:21:02 -0500 From: "Jim C. Nasby" To: Tom Lane Cc: Tobias Brox , Chris Browne , pgsql-performance@postgresql.org Subject: Re: Simple join optimized badly? Message-ID: <20061010142101.GD72517@nasby.net> References: <20061009213303.GA19144@oppetid.no> <20061009223030.GW72517@nasby.net> <9723.1160433916@sss.pgh.pa.us> <20061010140050.GZ72517@nasby.net> <17519.1160489688@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17519.1160489688@sss.pgh.pa.us> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:061010:tgl@sss.pgh.pa.us::hEkD/QhTfYJIuXRq:00000000000000000000 0000000000000000000000000qGB X-Hashcash: 1:20:061010:tobias@nordicbet.com::8GYmPoX0UaXu+a7R:00000000000000000 0000000000000000000000003Yc1 X-Hashcash: 1:20:061010:cbbrowne@acm.org::VmsN067dKS822QSn:09Ao8 X-Hashcash: 1:20:061010:pgsql-performance@postgresql.org::uo5pn/HkKzZuc31w:00000 0000000000000000000000001lFH X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/187 X-Sequence-Number: 21316 On Tue, Oct 10, 2006 at 10:14:48AM -0400, Tom Lane wrote: > "Jim C. Nasby" writes: > > I'd rather have the ugly solution sooner rather than the elegant one > > later (if ever). > > The trouble with that is that we couldn't ever get rid of it, and we'd > be stuck with backward-compatibility concerns with the first (over > simplified) design. It's important to get it right the first time, > at least for stuff that you know perfectly well is going to end up > embedded in application code. We've depricated things before, I'm sure we'll do it again. Yes, it's a pain, but it's better than not having anything release after release. And having a formal hint language would at least allow us to eventually clean up some of these oddball cases, like the OFFSET 0 hack. I'm also not convinced that even supplimental statistics will be enough to ensure the planner always does the right thing, so query-level hints may have to stay (though it'd be great if that wasn't the case). -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)