> On 19 Jan 2015, at 4:11pm, Andy (KU7T) <[email protected]> wrote: > > ANALYZE > > ANALYZE sqlite_master > > > > To my app at timely intervals. We are also running in WAL mode. Do I need to > do a WAL checkpoint (pragma wal_checkpoint) before running the index recalc > or not?
You don't even need the ANALYZE at timely intervals. Just do an ANALYZE once, when you have realistic data in your tables. You don't need to do it again unless the /type/ of data you're storing changes. Changes to the data itself don't require another ANALYZE. ANALYZE makes SQLite examine the columns for chunkiness. In other words, it tells the optimizer that your "surname" table has almost as many different values at it has rows whereas the "membershipType" column only has two values: 'normal' and 'premium'. Unless you're suddenly introduce three new types of membership there's no need to run ANALYZE again. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

