[prev in list] [next in list] [prev in thread] [next in thread]
List: sqlite-users
Subject: Re: [sqlite] SQLite Transaction Rate and speed...
From: "Marcus Grimm" <mgrimm () medcom-online ! de>
Date: 2009-03-06 21:31:34
Message-ID: ef5346b8ed9eb39101e08e9e7769e289.squirrel () webmail ! capcom ! de
[Download RAW message or body]
you should in any case try to encapsulate your
inserting loop with a transaction. you should still
be able to do select statements inside, in particular
if all is done within one DB connection.
transactions do not speed up considerably, they do it dramatically... ;)
also you may give a code example how you do this, since
there are enough sql gurus around here that may help to
improve further.
hth
Marcus
>
>
>
> ken-33 wrote:
>>
>>
>>
>> look at the sql syntax for insert or replace for sqlite.
>>
>> Also you goal to handle 1 million per minute is probably going to be
>> dependant upon your hardware.
>>
>> For instance throughput greatly increases with disk striping.
>>
>> Also the faster the RPM of the drive the more transactions can be
>> processed. Code it up and find out!
>>
>>
>
> I have actually coded it up. The way I am currently doing it is sending
> the
> data to a function (the data is 3 doubles) and in that function doing a
> SELECT to get the data currently in the DB, then updating the data, then
> UPDATE or INSERT. The SQL calls are compiled statements with binds, etc.
> It is woefully slow. I was kind of hoping that maybe I was missing a step
> or just unfamiliar with the best techniques. I know that when adding a lot
> of data with the BEGIN and END TRANSACTION things speed up considerably,
> but
> I can't use it in my case (I don't believe) because the UPDATE depends
> upon
> the data in the SELECT.
>
> John
>
> --
> View this message in context:
> http://www.nabble.com/SQLite-Transaction-Rate-and-speed...-tp22379931p22380540.html
> Sent from the SQLite mailing list archive at Nabble.com.
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic