Received: from tom.wettzell.ifag.de (tom.wettzell.ifag.de [193.174.166.191]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBIGf0696262 for ; Mon, 18 Dec 2000 11:41:00 -0500 (EST) (envelope-from dassing@wettzell.ifag.de) Received: from wettzell.ifag.de (john.wettzell.ifag.de [193.174.166.33]) by tom.wettzell.ifag.de (8.9.3/8.9.3) with ESMTP id QAA11208; Mon, 18 Dec 2000 16:40:24 GMT Message-ID: <3A3E3DF7.2D00A39D@wettzell.ifag.de> Date: Mon, 18 Dec 2000 17:40:23 +0100 From: Reiner Dassing Organization: BKG-Wettzell X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: de,en MIME-Version: 1.0 To: Bruce Momjian CC: Tom Lane , pgsql-sql@postgresql.org Subject: Re: Best database structure for timely ordered values References: <200012181622.LAA26713@candle.pha.pa.us> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Archive-Number: 200012/197 X-Sequence-Number: 531 Bruce Momjian wrote: > > > Reiner Dassing 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