sqlite performance
Posted: Mon 21 Feb 2011 10:09
My usual operations are very simple: given one big table with about 50 cols and 30k rows (can be up to 1m), make queries like SELECT AVG(col1) FROM table WHERE col2 IN (?) AND col3 IN (?) AND col4 < ?, SELECT col1 FROM table WHERE [same], etc. Columns are strings or floats.
I've started with simple .net DataTables + LINQ which are quite fast but obviously size-limited (it crashes long before there is no ram left). Also there are no indexes which I thought should increase performance.
Then I've tried SQLite (devart adapter) with SQL queries, which is like 10 times slower than in-memory datatables. I've made indexes on all columns in this table but this didn't help. I thought SQLite is considered one of the fastest embedded DBs so it's quite disappointing.
Are there some switches to pull all tables into memory?
Should I load SQLiteDataTable fully and then use filters instead of SQLiteCommands?
What is limit for SQLiteDataTable size? e.g. will it handle table with 50m cells?
I've started with simple .net DataTables + LINQ which are quite fast but obviously size-limited (it crashes long before there is no ram left). Also there are no indexes which I thought should increase performance.
Then I've tried SQLite (devart adapter) with SQL queries, which is like 10 times slower than in-memory datatables. I've made indexes on all columns in this table but this didn't help. I thought SQLite is considered one of the fastest embedded DBs so it's quite disappointing.
Are there some switches to pull all tables into memory?
Should I load SQLiteDataTable fully and then use filters instead of SQLiteCommands?
What is limit for SQLiteDataTable size? e.g. will it handle table with 50m cells?