tables and binary links -- future improvements

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Feb 9 16:50:58 CST 2007


On 9/2/07 11:30 PM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:

> Do I understand it correctly that if I was to use binary links in all
> (1:1,1:M,M:M) linking situations I would trade in speed for design
> flexibility?

Yes.
 
> If this is true, I would suppose that it is would be to calculate the
> loss of speed. Did I understand correct that the not optimized code
> doubles the weight?

Not code. Format on disk.

Right now implemented THE MOST general case, which works
for ALL cases 1:1,1:M,M:M

But for 1:1 and 1:M it is possible to use less disk space.
More compact structures on disk usually give win in speed also.

> So the use of a binary link in NOT(M:M) situation still costs twice
> the weight of 1 Object Pointer. (and would be twice as slow as using
> the Object Pointer)

Not exactly.

    10K in T1                   100K in T2

               1 rec linked to 10
              so we have 100K linked pairs

----------------
Using ObjectPtr in T2 we have:

        100K * 4 bytes = 400Kb  in table column
        ((10 + 1 + 1) * 4 = 48) * 100K * 1.5 = 720Kb index.

        total 1.1 MB

----------------
Using BinaryLink we get:

       about 2MB total

       in ideal must be the same 1.1
    
----------------------------
SPEED:

    search from One to Many table is the same in both cases.
    in reverse direction little slower of ObjectPtr.

 
> The advantage is my tables are from the start "uninfected" by (fk)
> key information

right
 
> Is this the only tradeoff? Or is the use of binary in not(M:M)
> situations really flawed, is there more to it then a design
> optimization?

Well, only I  can think about yet is little other style of coding.

ObjectPtr is FIELD OF TABLE. So you do

    INSERT INTO T(f1,f2,ptr) VALUES (1,3,58)

With links you at first make objects, then link them,
what more follow real-world model I think.

> To put it otherwise if design flexibility matters more to me (in the
> first months) than speed would you still suggest that I would use
> Object Pointers?

Bart,

In fact if your development time to get e.g. first beta is longer of 3-4
months, there are many chances that you will kick us to spend a week on this
Binary Links improvements. :-)


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