SQLite Forum

slow import of CSV files
Login
In the first example that was unsorted (inserted in random order) with a small cache the I/O rate was sustained at several hundred megabytes/second.  

When inserting "in-order" I/O rate was hugely reduced since there were almost no pages that needed to be re-read and re-written.

I/O was much lower with a larger cache (actually, where the cache was large enough to hold all the data the entire file was written in one big 3 GB/sec I/O at the end and all the operations occurring in the application/SQLite3 cache which is why there was almost no difference between the "in-order" and "random-order" insert speed.