SQL and API methods + benchs

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jan 24 10:05:23 CST 2005


On 1/24/05 7:44 AM, "Olivier" <vidal_olivier at yahoo.fr> wrote:

Hi Oliver,

> The API methods are exciting and very interesting because we really have the
> impression to control our DB and because the API methods become integrated
> perfectly with the other methods RB. valentina is great !
> It is true that they ask for more code.

> I made some benchs with the small project which I sent you.
> The API methods that I used are the same that in the sent project. The links
> are binary links.

> At the moment, SQL is much faster. Maybe that I have badly to optimize my code
> for the API. 

I also think so. It needs study your task.
For now quick notes:

1) have you bench with DebugLevel = 0 ?

2) as far as I see, in the SQL you SELECT all fields of table Zipcity,
Right? 

Actually SQL way have interesting feature:
    Let you have table with 20 fields,
    but you select only 4 fields.

    then Iteration of cursor will be 5 times faster of iteration
    of original table, because cursor will read only that 4 fields.

    For now we do not have way do the same trick in API.
    (in C++ we have in fact, just did not opened to V4RB.)

3) API way has other name -- Navigational way.
    this means that you should walk from record to record.
    this means that you can touch ONLY really required records.

 SQL way in contrast is oriented on the work with SETS of records.
 you find set of records WHERE.
 you UPDATE set of records WHERE.
 you join SET1 to SET2 of T1 and T2..
 and so on.     

This is the main difference in the ideology of these ways.
Valentina although try optimize API way to SETs also.
The old Navigational dbs (like dbVista) cannot do this absolutely.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina-beta mailing list