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 9C9583A41DB for ; Wed, 17 Nov 2004 06:09:08 +0000 (GMT) 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 38335-10 for ; Wed, 17 Nov 2004 06:09:02 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id 5E1F13A41A3 for ; Wed, 17 Nov 2004 06:09:02 +0000 (GMT) Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6672005; Tue, 16 Nov 2004 22:10:32 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org, Alexandre Leclerc Subject: Re: nuderstanding 'explain analyse' Date: Tue, 16 Nov 2004 22:07:50 -0800 User-Agent: KMail/1.6.2 References: <1dc7f0e304111613116532a64b@mail.gmail.com> In-Reply-To: <1dc7f0e304111613116532a64b@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200411162207.50341.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/241 X-Sequence-Number: 9195 Alexandre, > If the plans for both queries are exactly the same, should I assume > that the cost will also be the same? Nope. A seq scan over 1,000,000,000 rows is going to cost a LOT more than a seq scan over 1000 rows, even though it's the same plan. When you have the data sorted out, post explain analyzes and we'll take a shot at it. -- Josh Berkus Aglio Database Solutions San Francisco