I need help tuning the database connection parameters.
I have 2 modes.
Bulk Writing - 1 connection to the database (enforced by lockout and isolation). A new database is created and tons of data is bulk loaded into the file. Maximum performance is most important. Database corruption is not a big deal because the import can just run again.
Reading minimal write - Caching large amounts of data is important. Multiple clients can connect so data integrity is of moderate concern. It's not the end of the world if a database gets corrupted.
My question is are there any other turning parameters I can apply to get maximum performance? In general I prefer performance over data integrity unless it's going to cause major unreliablity. Dirty reads, and no crash recovery are fine for both modes.
Here's the turning parameters I have for Read minimal writes:
this.ExecuteNonQuery("PRAGMA cache_size = 32768");
this.ExecuteNonQuery("PRAGMA count_changes = 0");
this.ExecuteNonQuery("PRAGMA journal_mode = DELETE");
this.ExecuteNonQuery("PRAGMA read_uncommitted = 1");
this.ExecuteNonQuery("PRAGMA synchronous = NORMAL");
this.ExecuteNonQuery("PRAGMA temp_store = MEMORY");
Data Connection String
Data Source={0};FailIfMissing=False;Legacy Format=False;Cache Size=16384;Page Size=32768; // Where {0} is the file name.