TIP OF THE DAY!!! : SQL request and speed ? III

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Oct 30 20:07:31 CST 2005


On 10/30/05 7:38 PM, "Thierry Nauze" <ohmitou at wanadoo.fr> wrote:

> How  to use bingings with :
> baseValentina.SqlExecute("CREATE TABLE maTable (id UMedium, maVarChar
> varchar(1022) )")
> 0.116 s for Valentina  vs  0.013 s for ...
> baseSQLite.SQLExecute("CREATE TABLE maTable (id integer, maVarChar
> varchar)") ?

Here there is no need for binding.

Thierry, CREATE TABLE is not big subject for speed.
Of you going create/drop a lots of tables ???

Then use RAM based tables.



>> Note, using binding, you do not need escape strings. Another speedup.
> 
> ???
> 
>    s="l'oiseau"
>    query = "INSERT INTO maTable (id,maVarChar) VALUES (:1,:2)"
>    for i=1 to 10000
>      call baseValentina.SqlExecute( query, Array( str(i), s ) )
>    next
> 
> 0.70 s for Valentina  vs   0.57 s for ...

>    for i=1 to 10000
>      baseSQLite.SqlExecute( "INSERT INTO maTable (id,maVarChar)
> VALUES ("+str(i)+",'"+replace("l'oiseau","'","''")+"')" )
>    next
> 
> It is not evident !

Interesting. 

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