Alon Gutman
Alon Gutman

Reputation: 875

Sqlite - how to use more memory and cache, and make it run faster

I'm inserting into a table in Sqlite around 220GB of data,

and I noticed it use a lot of Disk I/O, read and write, but doesn't use the computer's memory in any significant way, though there is a lot of free memory, and I don't use commit to often.

I think the disk I/O is my bottle neck not CPU nor Memory. how can I ask it to use more memory, or insert in bulk so it could run faster?

Upvotes: 14

Views: 15638

Answers (1)

Rufo El Magufo
Rufo El Magufo

Reputation: 706

Review all options in http://www.sqlite.org/pragma.html. You can tuning a lot of performance relative aspect of SQLite in your application.

All I/O activity is for the integrity of data. SQLite by default is very safe.

Your filesystem is also important for the performance. Not all FS play fair with fsync and the (default) config for internal logging of SQLite.

Upvotes: 4

Related Questions