use transactions, speeds up a lot

Op maandag 20 juni 2005 11:35, schreef Yuriy:
> Hello sqlite-users,
>
> Sqlite low level and Speed.
>
> Sorry for my bad English.
>
> I try use  Sqlite  for  Operation FAST grouping  strings (delete
> duplicates)
>
> I have input array of strings
>
> String1
> String2
> String3
> String1
> String2
> ………
> StringN
>
>
> Need delete dublicates.
>
> Output database
> String1
> String2
> String3
> ……..
> StringN
>
> 1. Example of the decision
>
> CREATE TABLE testtable (val text)
> CREATE INDEX index_val ON [testtable]([val]);
> PRAGMA synchronous = OFF;
>
> for i:=1 to 10000000 do
> begin
> select * from testable where  val=StringN
> if val NOT Exist  insert into testtable
> end
>
> Very Slow.
>
> 2. Example of the decision
>
>
> CREATE TABLE testtable (val text,hashval integer)
> CREATE INDEX index_hashval ON [testtable]([ hashval]);
> PRAGMA synchronous = OFF;
>
> for i:=1 to 10000000 do
> begin
> select * from testable where  hashval=hash(StringN)and(val= StringN)
> if val NOT Exist  insert into testtable
> end
>
> Very Slow.
>
>
> 3. Example of the decision
>
> I find good example for SQLite Low level functions SQlite VS BDB.
>
> http://rganesan.blogspot.com/
>
> But this example use such functions as
>
> sqlite3BtreeOpen
> sqlite3BtreeInsert
> sqlite3BtreeCursor
>
> I Use Windows and Delphi. In the SQlite3.dll no import this functions.
>
> Please Help me. May be need recompile sql I Have Visual C++ and C++Builder
> If need recompile as make it is on Windows Platform?
>
> May be present other decision this problem? Need more speed for grouping
> big arrays of strings
>
> Thanks you.

-- 
Met vriendelijke groet
Bert Verhees
ROSA Software

Reply via email to