> On Oct 11, 2019, at 7:43 AM, GopiKrishna Parisa 
> <gopikrishna.par...@gmail.com> wrote:
> 
> One weird thing is for some insertions, it's taking more than 200 msec for
> single record where as others takes around 20 to 40 (avag 27 msec).

Those sound like numbers I’d expect for committing a transaction. (The longer 
time is for a WAL flush.) But the major performance tip for SQLite is: minimize 
the number of transactions, because commits are expensive.

In your case, try to insert as many records as you can in one transaction. If 
you’re copying them from a text file, just use a single transaction. If they’re 
live, you do want to commit transactions periodically for durability, maybe 
every few seconds.

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to