Here is the schema of table:
CREATE TABLE statdata (
type INT,
seq INT,
uid VARCHAR( 36 ),
counter INT,
PRIMARY KEY ( type, seq ASC )
);
before my modify:
500 rows at maximum,
query:insert or replace (...) in batch mode
take 10-20seconds and 2.5M IO writing
after my modify:
100 rows at maximum,
query:delete from statdata; insert (...) in batch mode,
take about second and 70k IO writing
So IO writing is unacceptable before my modify.
在 2013-04-22 06:16:49,"Klaas V" <[email protected]> 写道:
>>On Sun, 21 Apr 2013 11:15:23 +0800 (CST), 刘运杰 <[email protected]>
>>wrote:
>>Ok,I do not make my means clearly. I mean 60 seconds after my
>>program started,not token 60 seconds to load database file.
>...
>>Now,I modify the implement of batch query, it take about one
>>second and 70k IO writing.So there are abnormal something in
>>batch query indeed,Sqlite or Qt SQL module.
>
>>>From: Kees Nuyt <[email protected]>
>>>Date: 21 Apr 2013 09:35:53 GMT+02:00
>>>Is this still about bulk INSERT
>
>It looks like Yunjie reorganized the database in a way that the specific table
>is contiguous.
>This action can make a huge difference in I/O time.
>_______________________________________________
>sqlite-users mailing list
>[email protected]
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users