On 11 August 2017 11:08:02 GMT+01:00, james ni <james...@live.cn> wrote:
>Maybe we are talking the different thing.
>
>
>Background of my problem:
>
>1, When one table grows larger, I found the INSERT speed is becoming
>slower and slower;

It seems to me that you may have chosen to view the problem from an angle which 
will hide the solution.

I had a similar problem in a previous job. I had data arriving from a logging 
system with multiple events per second. This data had to be parsed and loaded 
into an SQLite db.

At first, I retrieved log data every five minutes and ran an INSERT for each 
log entry. This "just worked" for a week or so. Then I noticed that elapsed 
time was growing. Advice from this list encouraged me to enclose multiple 
INSERT commands in a single transaction. The results were dramatically 
effective, although I should mention that this was not the only design 
optimization I needed.

If my use case is actually similar to yours, I'ld suggest you try this too.

Best regards,
Niall O'Reilly


-- 
Sent from Kaiten Mail. Please excuse my brevity.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to