Collection Object -- I need to know your needs.

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Aug 2 00:34:40 CDT 2006


On 8/2/06 12:25 AM, "Shaun Wexler" <dev at macfoh.com> wrote:

>> RB Tree inside of BLOB give you ability load this into RAM,
>> And do search. Right ?
> 
> In storage, only sorted object array is maintained.  In memory, there
> are two buffers:  indexed objects and object index (rb tree), and
> indexes are relative to start of each buffer.  You can perform a
> binary search on the array in storage, or load the sorted array and
> quickly generate a rb tree index (ie b-tree), then the array might
> become unsorted in memory upon insertion/deletion, but can be
> rebalanced later or upon writing back to storage (and you then
> discard the rb tree index).
> 
>> But simply sorted array can allow this.
> 
> Yes, but at expense of memmove to mutate it = very slow.
> 
>> But you cannot search through the whole column.
>> I want be able find records which have arrays that contain value 3.
>> 
>> You see? Having index this can be done very fast.
> 
> Create an IndexSet class, and store an array of index ranges.

In RAM? 

IndexSet this is some Apple class?

But this will not work for big dbs in few Gbs then

> You  can reduce storage immensely if you steal one bit from the values as  a
> flag, thus worst-case count is (maxIndex-minIndex)/2+1 plus the  object
> itself.

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list