X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A38E652995; Sat, 23 Jul 2005 07:42:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 70068-03; Sat, 23 Jul 2005 10:42:36 +0000 (GMT) Received: from colo.samason.me.uk (unknown [69.55.228.22]) by svr1.postgresql.org (Postfix) with ESMTP id C2AEC52993; Sat, 23 Jul 2005 07:42:35 -0300 (ADT) Received: from colo.samason.me.uk (colo [69.55.228.22]) by colo.samason.me.uk (8.12.11/8.12.11) with ESMTP id j6NAgZR8011880; Sat, 23 Jul 2005 11:42:35 +0100 (BST) (envelope-from sam@colo.samason.me.uk) Received: (from sam@localhost) by colo.samason.me.uk (8.12.11/8.12.11/Submit) id j6NAgZEt011877; Sat, 23 Jul 2005 11:42:35 +0100 (BST) (envelope-from sam) Date: Sat, 23 Jul 2005 11:42:35 +0100 From: Sam Mason To: pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Planner doesn't look at LIMIT? Message-ID: <20050723104235.GM62747@colo.samason.me.uk> Mail-Followup-To: Sam Mason , pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org References: <758d5e7f0507220210bfa4978@mail.gmail.com> <29473.1122043197@sss.pgh.pa.us> <6440.1122049220@sss.pgh.pa.us> <1122053518.21502.180.camel@localhost.localdomain> <7214.1122055577@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7214.1122055577@sss.pgh.pa.us> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200507/358 X-Sequence-Number: 13599 Tom Lane wrote: >Could be. I went back to look at Sam Mason's report about three weeks >ago, and it definitely seems to explain his issue. I've just built a patched version as well and it appears to be doing what I think is the right thing now. I.e. actually picking the plan with the lower cost. Thanks! Sam