SQLite Forum

slow import of CSV files
Thank you, Keith.

Now I understand and loaded the table (still the old way, it was running for 10 hours). I will test larger cache, I understand SQLite needs to hold index in RAM, otherwise it re-reads to ensure uniqueness. 

I now wanted to count rows with SELECT count() FROM tableName; without any filtering criteria. And it is very slow, much slower than Linux' line count wc -l CSVFile. What causes this? Count does not need to hold anything in RAM. I would expect the two methods (sqlite and wc -l) to have similar speed if not SQLite being faster since disk I/O is the same.