X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0B4B3D1B2BD for ; Thu, 8 Jul 2004 13:46:58 -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 62143-02 for ; Thu, 8 Jul 2004 16:46:50 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 97A76D1B20E for ; Thu, 8 Jul 2004 13:46:48 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id D56BB356F6; Thu, 8 Jul 2004 09:46:46 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id D3F90356D6; Thu, 8 Jul 2004 09:46:46 -0700 (PDT) Date: Thu, 8 Jul 2004 09:46:46 -0700 (PDT) From: Stephan Szabo To: Guido Barosio Cc: pgsql-admin@postgresql.org Subject: Re: Strange scenary. In-Reply-To: <20040703181856.3c861bb4.gbarosio@sinectis.com.ar> Message-ID: <20040708093450.B95902@megazone.bigpanda.com> References: <20040703181856.3c861bb4.gbarosio@sinectis.com.ar> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 200407/107 X-Sequence-Number: 14175 On Sat, 3 Jul 2004, Guido Barosio wrote: > Hi, > > This is the problem. I create a database from cero. I create a empty table, name students. I ask for an EXPLAIN > on this new table, and the output of the query analyzer tells me that this table is filled with 1000 rows. > > So...why is that? That's the default value set for the estimated number of rows; that row count is the estimated rows based on the statistics not the actual number of rows returned (see EXPLAIN ANALYZE's second set of numbers for each step for that information) and you haven't run analyze to give it more accurate statistics.