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 13AF2D1C4DB for ; Fri, 8 Aug 2003 15:14:56 +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 42934-04 for ; Fri, 8 Aug 2003 12:13:27 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 08697D1C9A6 for ; Fri, 8 Aug 2003 12:14:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h78FEaSa026639; Fri, 8 Aug 2003 11:14:37 -0400 (EDT) To: "Matt Clark" Cc: pgsql-admin@postgresql.org Subject: Re: Cost estimates consistently too high - does it matter? In-reply-to: References: Comments: In-reply-to "Matt Clark" message dated "Fri, 08 Aug 2003 12:47:20 +0100" Date: Fri, 08 Aug 2003 11:14:36 -0400 Message-ID: <26638.1060355676@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/114 X-Sequence-Number: 9837 "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