Item 3, in the documentation refers to <https://www.sqlite.org/draft/pragma.html#pragma_integrity_check>. Because the features of that PRAGMA were introduced 'backwards', the documentation looks a little strange. I came up with this, though there may be problems with that too. ___ <code>integrity_check(TABLENAME)</code> checks for errors only in the named table and indexes of that table. <code>integrity_check</code> with no arguments does the same as iterating through all tables using <code>integrity_check(TABLENAME)</code> but also detects all the other errors listed above. <code>integrity_check(N)</code> does the same as the option with no arguments, but stops checking once N errors have been found. This allows a faster check if you are interested just in whether the database file does, or does not, have faults. ___ Can the function described in 7b please delete the dodgy <code>sqlite_stat1</code> table, unless the database has been opened with r/o permission ? In addition can <code>ANALYZE</code> delete stat1, stat2, stat3 and stat4, before it starts compiling new tables ? My logic is that if the programmer has specifically chosen to use <code>ANALYZE</code> they are explicitly stating that they don't care about any old data.