Re: Threaded Records in SQL: Advice Needed

From: "Moray McConnachie" <moray(dot)mcconnachie(at)computing-services(dot)oxford(dot)ac(dot)uk>
To: "Ingram, Bryan" <BIngram(at)sixtyfootspider(dot)com>, <mig(at)utdt(dot)edu>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Threaded Records in SQL: Advice Needed
Date: 2000-04-12 08:45:50
Message-ID: 008501bfa45b$8162d3a0$760e01a3@oucs.ox.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

----- Original Message -----
From: "Ingram, Bryan" <BIngram(at)sixtyfootspider(dot)com>
To: "Ingram, Bryan" <BIngram(at)sixtyfootspider(dot)com>; <mig(at)utdt(dot)edu>
Cc: <pgsql-sql(at)postgresql(dot)org>
Sent: Tuesday, April 11, 2000 9:57 PM
Subject: RE: [SQL] Threaded Records in SQL: Advice Needed

> In reference to the ascii/numeric ordering problem ..
>
> But first let me say ..if someone knows of a way to get ascii values to
> order as if they were numerics ..please let me in on the secret ..
>
> Instead of using numbers, if letters were used the ordering would be
> correct.
>
> The id string would become something like: A/A/A for the 1st reply to the
> 1st reply of the 1st root message.
>
> This will work fine for threads with relatively few replies on the same
> level. For instance, the number 100 would take only 4 characters to
encode,
> however, the number 1000 would need 39 characters to encode.

More efficient to use letters as numbers in base 26? Then for up to 676
replies per level you need only 2 letters. If you allowed 3, you'd have
some headroom.
----------------------------------------------------------------
Moray(dot)McConnachie(at)computing-services(dot)oxford(dot)ac(dot)uk

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Fabrice Scemama 2000-04-12 10:20:31 Re: DBD::ODBC for Linux
Previous Message Peter Stamfest 2000-04-12 04:28:48 Re: DBD::ODBC for Linux