ejurgensen/forked-daapd — pull request #40 by chme (2014-07-13 08:56:18+00:00)
Title: Added options to modify the SQLite cache size, synchronous flag and journal mode

This adds the possibility to change the defaults from SQLite through the config file for:
- the size of the page cache (http://www.sqlite.org/pragma.html#pragma_cache_size)
- the synchronous flag (http://www.sqlite.org/pragma.html#pragma_synchronous)
- the used journal mode (http://www.sqlite.org/pragma.html#pragma_journal_mode)

Increasing the page cache size should increase the performance for select queries by reducing the number of necessary reads from the disk.
Setting the synchronous flag to false increases the performance for update and inserts, but could lead to a corrupted database file if the system crashes (see the docs).
Setting the journal mode to MEMORY or OFF should also increase the update and insert performance, but could also lead to a corrupted database file.

I have seen noticeable performance improvements on the bulk scan (especially the synchronous flag increases performance), but found it hard to measure the effect on select queries. @ejurgensen what do you think about this?