Re: Best database structure for timely ordered values

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reiner Dassing <dassing(at)wettzell(dot)ifag(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Best database structure for timely ordered values
Date: 2000-12-18 16:46:55
Message-ID: 200012181646.LAA29528@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> > 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Reiner Dassing 2000-12-18 17:13:46 Re: Best database structure for timely ordered values
Previous Message Reiner Dassing 2000-12-18 16:40:23 Re: Best database structure for timely ordered values