Re: [sqlite] Arrangement of VACUUM, INTEGRITY_CHECK and OPTIMIZE

2019-01-09 Thread Simon Slavin
On 9 Jan 2019, at 2:01pm, spamh...@bluewin.ch wrote: > In which order should VACUUM, INTEGRITY_CHECK and OPTIMIZE be executed? If you are in any situation where INTEGRITY_CHECK should be run, do not make any changes to the database (e.g. ANALYZE) first. Those changes might overwrite parts of t

Re: [sqlite] Arrangement of VACUUM, INTEGRITY_CHECK and OPTIMIZE

2019-01-09 Thread Richard Hipp
On 1/9/19, spamh...@bluewin.ch wrote: > In which order should VACUUM, INTEGRITY_CHECK and OPTIMIZE be executed? I suppose that depends on what you are trying to accomplish? Why do you execute them at all? I suppose INTEGRITY_CHECK should be run with first opening the database file, to ensure th

Re: [sqlite] Arrangement of VACUUM, INTEGRITY_CHECK and OPTIMIZE

2019-01-09 Thread Keith Medcalf
>For the OPTIMIZE the documentation states: "... run just before >closing each database connection ...". There isn't a reason to do it >instead after opening a connection each time? The documentation tells you under what circumstances PRAGMA OPTIMIZE does anything, in the current implementation.

[sqlite] Arrangement of VACUUM, INTEGRITY_CHECK and OPTIMIZE

2019-01-09 Thread spamh...@bluewin.ch
Hello all As I was not able to find the information I have to ask here. Maybe it is trivial. In which order should VACUUM, INTEGRITY_CHECK and OPTIMIZE be executed? I have been using this one so far but I am not sure about the latter two. For the OPTIMIZE the documentation states: "... run just b