Drupal sqlite vacuum
Tue, 21 Nov 2017 16:20:37 +0100
Drupal's sqlite backend is working surprisingly well. But then there is the moment when you realise that the database has grown to over 1GB and you need to VACUUM the sqlite database. I don't know why Drupal has it's own collation which makes it impossible to use system tools to work with the sqlite database.
After quite some time I finally found a rather simple solution and got the sqlite database to under 20MB again:
sqlite3 sites/default/files/.ht.sqlite "VACUUM;"
Error: no such collation sequence: NOCASE_UTF8
After quite some time I finally found a rather simple solution and got the sqlite database to under 20MB again:
../bin/drush php-eval "db_query('vacuum;');"
This website is tracked using the Piwik analytics tool. If you do not want that your visits are logged this way you can set a cookie to prevent Piwik from tracking further visits of the site (opt-out).