Collection Object -- I need to know your needs.

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Aug 2 15:18:58 CDT 2006


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

>>> Create an IndexSet class, and store an array of index ranges.
>> 
>> In RAM?
>> 
>> IndexSet this is some Apple class?
> 
> Yes, NSIndexSet.
> 
>> But this will not work for big dbs in few Gbs then
> 
> If all records are disjoint, it will consume no more storage than an
> array or set.  Any adjacent records reduce the size of the index
> set.  It is a series of sorted ranges, such as:  { 0-12, 39, 41-45,
> 937, 2048 } which in this case represents 21 unique values, stored as
> 7 int's.  In memory, you'd store it like this:  12, 0, 39, 45, 41,
> 937, 2048, with count=21 and length=7.  If a value is greater than
> the value to its left, its either a unique value or (if the value to
> its right is less) then it is the end of a range.  Cool?  ;)
> 
> This works for any kinds of values which can be compared < or >,
> though non-int's need to declare a minimum epsilon granularity.

Right. 

and this can be and should be added into Valentina indexes.
Kind of compression.

--------
But again, we have talk about Table T have column
    
    ARRAY of OID (or other numbers) based on BLOB.

BLOB field itself do not have index.

Let table T have million records.
Let in average arrays contain 50-100 items.
So we have about 75 millions OID values total

To be able really fast find in Table T records
    which have arrays
        which contain some OID = xxx

We need to have index with 75 millions total pairs.

You see?


-- 
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