X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7F4C6D1C4B9 for ; Fri, 8 Aug 2003 15:39:53 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 45013-04 for ; Fri, 8 Aug 2003 12:38:25 -0300 (ADT) Received: from wight.ymogen.net (unknown [217.27.240.153]) by svr1.postgresql.org (Postfix) with SMTP id 83F97D1C4DB for ; Fri, 8 Aug 2003 12:39:41 -0300 (ADT) Received: (qmail 24776 invoked from network); 8 Aug 2003 15:39:40 -0000 Received: from unknown (HELO solent) (213.165.136.12) by wight.ymogen.net with SMTP; 8 Aug 2003 15:39:40 -0000 From: "Matt Clark" To: "Tom Lane" Cc: Subject: Re: Cost estimates consistently too high - does it matter? Date: Fri, 8 Aug 2003 16:38:55 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <26638.1060355676@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/115 X-Sequence-Number: 9838 Well, I usually am under a misapprehension! Thanks for the explanation about LIMIT too. In that case then, I shall stop worrying and learn to love the planner. M > -----Original Message----- > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] > Sent: 08 August 2003 16:15 > To: Matt Clark > Cc: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] Cost estimates consistently too high - does it > matter? > > > "Matt Clark" writes: > > I've noticed that the cost estimates for a lot of my queries are > > consistently far to high. > > You seem to be under a misapprehension. The cost estimates are not > in units of milliseconds, they are on an arbitrary scale with 1.0 > defined as one disk fetch. > > LIMIT throws another monkey wrench into the mix: the estimates for the > plan nodes underneath the limit are done as if the plan were to be > executed to completion, which of course it won't be. > > regards, tom lane > >