title: sqlite updates slow (15 seconds for 1720 records) on SSD disk
body: <p>Dear fellow developer, for some reason updates for 1720 records takes around 15 seconds when on SSD disk (especially when having trim enabled).</p>
  
  <p>I have tweaked the sqlite settings using the following document (which works well)
  <a href="http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html" rel="noreferrer">http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html</a></p>
  
  <p>I have the following PRAGMA's set to optimize performance and I DO use transactions around the complete set of updates.</p>
  
  <pre><code>sqlite3_exec(database, "PRAGMA cache_size=500000;", nil, nil, nil);
  sqlite3_exec(database, "PRAGMA synchronous=OFF", nil, nil, nil);
  sqlite3_exec(database, "PRAGMA count_changes=OFF", nil, nil, nil);
  sqlite3_exec(database, "PRAGMA temp_store=MEMORY", nil, nil, nil);
  </code></pre>
  
  <p>It seems the SSD is doing too much (like deleting blocks and such) which makes it block for 15 seconds for just 1720 simple records update.</p>
  
  <p>Weirdly enough: inserting 2500 records is almost instant.
  Can you help me and give me some pointers how to fix this?</p>