SQL and API methods + benchs

Olivier vidal_olivier at yahoo.fr
Mon Jan 24 06:44:31 CST 2005


Ruslan,

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.

Some remarks:

I have a crash if I use:
SELECT zipcode, cityname, namestreet FROM zipcity, street where zipcode 
= '75000'

With
SELECT zipcode, cityname, namestreet FROM zipcity join street on 
linkCityStreet where zipcode = '75000'
That works perfectly.

I do not manage to cast the sets.

Dim setBit have vbitset
Dim setArray have varrayset
Dim set have vset

    setBit=base.zipCity.stringField("zipcode").find("75000") //OK
   setArray=new varraySet(setBit)
-> crash

   setBit=base.zipCity.stringField("zipcode").find("75000") //OK
setArray=varrayset(setBit)
-> "illegal cast exception"

setBit=base.zipCity.stringField("zipcode").findStartsWith("75")
-> "type mismatch error. expected vbitset but got vset"

set=base.zipCity.stringField("zipcode").findStartsWith("75")
setArray=new varraySet(set)
-> "parameters are not cumpatible with this function"

set=base.zipCity.stringField("zipcode").findStartsWith("75")
setArray=varraySet(set)
-> "illegal cast exception"


bench tests :

the two with valentina 2 b37, RB 5.5.4, os X eMac 1,25Ghz, cache 80 Mb.

(with displaying of listbox)

table zipCity : 40 000 records (among which 2 with zipCode='75000')
table streets : 100 000 records

1 -

100 streets arre linked (with binarylink) with 1 zipcode '75000'.

WITH SELECT zipcode, cityname,namestreet FROM zipcity join street on 
linkcitystreet where zipcode='75000' ORDER BY zipcode, cityname, 
namestreet

first search : 3 or 4 ticks
next searchs : 1 ticks, sometimes 2.

WITH EQUIVALENT API and Sets

first search : 8 ticks
next searchs : 6 or 7 ticks

2 -

100 streets arre linked (with binarylink) with 1 zipcode '75000'.

WITH SELECT zipcode, cityname,namestreet FROM zipcity join street on 
linkcitystreet where zipcode='75000'

first search : 3 ticks
next searchs : 1 ticks, sometimes 2.

WITH EQUIVALENT API and Sets

first search : 7 ticks
next searchs : 3 ticks

3 -

1000 streets arre linked (with binarylink) with 1 zipcode '75000'.

WITH SELECT zipcode, cityname,namestreet FROM zipcity join street on 
linkcitystreet where zipcode='75000'  ORDER BY zipcode, cityname, 
namestreet

first search : 25 ticks
next searchs : 12 ticks.

WITH EQUIVALENT API and Sets

first search : 115 ticks
next searchs : 33 ticks


4 -

1000 streets arre linked (with binarylink) with 1 zipcode '75000'.

WITH SELECT zipcode, cityname,namestreet FROM zipcity join street on 
linkcitystreet where zipcode='75000'

first search : 19 ticks
next searchs : 11 ticks.

WITH EQUIVALENT API and Sets

first search : 33 ticks
next searchs : 25 ticks



thank you

olivier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3658 bytes
Desc: not available
Url : http://lists.macserve.net/pipermail/valentina-beta/attachments/20050124/d5217f37/attachment.bin


More information about the Valentina-beta mailing list