Re: By The Dawn's Normal Light

From: Kenneth Downs <firstinit.lastname_at_lastnameplusfam.net>
Date: Sun, 24 Oct 2004 12:31:33 -0400
Message-ID: <6dlglc.b5i.ln_at_mercury.downsfam.net>


Paul wrote:

> Kenneth Downs wrote:

>> If the list is uniquely ordered I think you can do everything 1st order.
>> The inserted item must be either head, tail, or have defined before and
>> after nodes.  You should also be able "SELECT..WHERE sequence>x" to get
>> all
>> items after item x.  Don't know if you can guarantee unique sequence #'s
>> on
>> inserts without an occasional resequencing, like an index reorg.  This
>> seems to be the absolute positioning case.

>
> But then if you wanted to insert a new entry at the beginning you'd have
> to shuffle all the higher entries' sequences up, which would be a
> second-order operation.
>
> Unless you use an "dense" domain e.g. rationals and stick in
> non-integers when you want to insert a new entry between two adjacent
> integers.
>

Yeah, I was figuring a dense domain. If you use strings, then between "1" and "2" is "15" or rather between " 1" and " 2" is "15". Then between "15 and "20" is "17" and so forth. Then between "17 and "18" is "175" and on it goes.

The problem is that you can of course hit the limit of the width of the column being used, forcing a reorg.

I think the various approaches are outlined pretty well in one of Mr. Celko's books, but can't recall which one.

-- 
Kenneth Downs
Use first initial plus last name at last name plus literal "fam.net" to
email me
Received on Sun Oct 24 2004 - 18:31:33 CEST

Original text of this message