pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Reiner Dassing <dassing@wettzell.ifag.de>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Best database structure for timely ordered values
Date: Mon, 18 Dec 2000 17:40:23 +0100
Message-ID: <3A3E3DF7.2D00A39D@wettzell.ifag.de> (raw)
References: <200012181622.LAA26713@candle.pha.pa.us>

Bruce Momjian wrote:
> 
> > Reiner Dassing <dassing@wettzell.ifag.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@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

--

   Reiner Dassing



view thread (7+ messages)  latest in thread

Message-ID: <3A3E3DF7.2D00A39D@wettzell.ifag.de>
Permalink:  ../3A3E3DF7.2D00A39D@wettzell.ifag.de/
Also on:    postgresql.org/message-id/3A3E3DF7.2D00A39D@wettzell.ifag.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: dassing@wettzell.ifag.de, pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us
  Subject: Re: Best database structure for timely ordered values
  In-Reply-To: <3A3E3DF7.2D00A39D@wettzell.ifag.de>
  References: <200012181622.LAA26713@candle.pha.pa.us> <3A3E3DF7.2D00A39D@wettzell.ifag.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox