Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBIGlN696976 for ; Mon, 18 Dec 2000 11:47:23 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id LAA29528; Mon, 18 Dec 2000 11:46:55 -0500 (EST) From: Bruce Momjian Message-Id: <200012181646.LAA29528@candle.pha.pa.us> Subject: Re: Best database structure for timely ordered values In-Reply-To: <3A3E3DF7.2D00A39D@wettzell.ifag.de> "from Reiner Dassing at Dec 18, 2000 05:40:23 pm" To: Reiner Dassing Date: Mon, 18 Dec 2000 11:46:55 -0500 (EST) CC: Tom Lane , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200012/198 X-Sequence-Number: 532 > > I assume the user is concerned about non-balanced btrees. > That is correct! > As I tested an example database with about 7 million entries on PostgreSQL V > 6.5.2 > and the result of > select count(*) from table; > tooks about 3 minutes I have this concern. > May be version 7.0.3 will give a better result. The larger problem is that count(*) doesn't use the index at all. It just does a sequential scan of the heap table. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026