Adding records
Ruslan Zasukhin
sunshine at public.kherson.ua
Fri Feb 3 10:34:06 CST 2006
On 2/3/06 4:28 AM, "Damon Pillinger" <daisychain at iinet.net.au> wrote:
Hi Damon,
> What is the fastest way to add records?
AP way table.AddRecord
> Val 2.1
> RB 5.5.5 Win
>
> I am using SQL INSERT INTO at the moment and can get 8.12 seconds for
> 10,000 records but wondered if there is a faster way?
Yes. API way can add 100,000 records in 3.5 seconds.
Records have 13 fields in this test.
> Also is there a "Begin transaction" as this seems to speed up SQLite
> significantly.
No, SqlLite is special here :-)
All normal dbs become slower on transactions.
SqlLite is faster with transaction because EACH transaction
open/close disk file. IT do not have cache at all.
So if you self start transaction then you avoid thousands
of open/close in SqlLite.
IF you want use SQL and not Api, then the best way to use parameters:
query = "INSERT INTO T1(f1,f2,f3) VALUES (?,?,?)"
Look into SQL_Way/Bind example
--
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