SQLite Forum

Runtime of and opcode counts of ANALYZE
Login
I'm using integrity_check(100) to ensure that the database is undamaged. 
The quick check runs faster, but does not check indices and so the check may miss database file damage in these areas.

I have added the check because users do all kind of crazy things, from wobbly external hard disks with crappy cables to NAS storage for the database to Wi-Fi access to the database NAS to abused USB sticks for database transfer...

The integrity_check is the best measure to check a database and inform users about issues before the "malformed on disk" panic message shows up suddenly when accessing less often used sections of the database.

I have included the stats for the good and super-slow database below. Sorry for the duplicate post. I missed some info in my first post and the "Delete" button for a post seems to do nothing?

**Another finding:** Running integrity_check in sqlite3 with .progress 50000 seems to call the callback only half as often as the callback is called in my code...

Maybe there is some setting or #pragma my software uses that causes this? I could not find anything in the docs, though.