> Le 19 févr. 2020 à 17:26, Simon Slavin <slav...@bigfraud.org> a écrit : > > On 19 Feb 2020, at 4:18pm, Richard Hipp <d...@sqlite.org> wrote: > >> There is no benefit to running >> ANALYZE after running VACUUM if the ANALYZE data (the content of the >> sqlite_stat1 table) is still up-to-date. > > However, if you have a yearly maintenance procedure, it might make sense to > include ANALYZE in it. This would take care of circumstances where your > business has changed character, for instance changing from selling a lot to a > few customers, to selling a little to many customers.
So, reading the precise and complete description of Richard, and this idea from Simon, having an apparently sane database (pragma integrity_check and pragma foreign_key_check successful at least), it would make sense to do : REINDEX, ANALYZE and then VACUUM as part of final preparation step for archive (the DB would be seldom queried later). In this plan, the REINDEX step would seem probably useless if there have been no collation changes, but I have seen cases where some indexes are incredibly more compact after REINDEX (which is logical). ⏤ Olivier _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users