Re: Best database structure for timely ordered values

From: Reiner Dassing <dassing(at)wettzell(dot)ifag(dot)de>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
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:40:23
Message-ID: 3A3E3DF7.2D00A39D@wettzell.ifag.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Bruce Momjian wrote:
>
> > Reiner Dassing <dassing(at)wettzell(dot)ifag(dot)de> writes:
> > > The primary index must be the epoch.
> > > As there will be no deletion from this data I fear - due to the
> > > internal representation of B-trees - the performance will degrade very
> > > soon.
> >
> > Nonsense. btree should work just fine for that. Use a timestamp
> > column for the primary key, and away you go.
> >
> > (Actually, time alone doesn't seem like it'd be necessarily unique,
> > so maybe you don't want to call it a primary key. But certainly
> > you can make a non-unique index on that column.)
>
> 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.

> Ours are
> auto-balancing.
>
> --
> 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

--

Reiner Dassing

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2000-12-18 16:46:55 Re: Best database structure for timely ordered values
Previous Message Bruce Momjian 2000-12-18 16:22:20 Re: Best database structure for timely ordered values