Hello Arie,
There are a few very important guidelines for optimal SQLCipher performance:
* Do not repeatedly open and close connections, as key derivation is
very expensive, by design
* Use transactions to wrap insert / update / delete operations. Unless
executed in a transaction scope, every operation will occur within it's
own transaction which slows things down by several orders of magnitude
* Ensure your data is normalized (i.e., using good practices for
separation of data into multiple tables to eliminate redundancy).
Unnecessary duplication of data leads to database bloat, which means
more pages for SQLCipher to operate on
* Ensure that any columns that are used for searches or join conditions
are indexed. If you don't, SQLCipher will need to execute full database
scans across large numbers of pages
* Vacuum periodically to ensure databases are compact if you do large
deletes, updates etc.
Finally, to diagnose further the performance of your specific query
statements, could you run an explain query plan [1] command against some
of your queries? The output of the explain query command is described
here [2]. We would be glad to help if you have any further questions
about your results. Thanks!
[1]
http://www.sqlite.org/lang_explain.html
[2]
http://www.sqlite.org/eqp.html
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "SQLCipher Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
sqlcipher+...@googlegroups.com
> <mailto:
sqlcipher+...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.
--
Nick Parker