On 15 Jan 2014 at 19:20, Steven Fisher <te...@me.com> wrote: 

> After opening, I want to do some basic checking of my database.
>
> I’m finding integrity_check much too slow for some of my users (especially
> with large amounts of data) but I don’t want to just blindly trust the
> database either.
>
> A few options:
>
> - Rely on what sqlite does on its own when I start actually using the database
> - Test for particular tables I expect
> - Something else
>
> Any thoughts?

On startup of my app (an email client) I do a number of checks on each mailbox 
(each is an SQLite db). I do these things:

1) open it
2) try to select something from the main table
3) try to read and write back a value from a metadata table (it has just the 
one row)

That ensures that the mailbox exists, has the right tables, and is 
read/writable. You could do something similar, appropriate for your situation.



--
Cheers  --  Tim
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to