mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-08-01 15:04:11 +02:00
sqlite-utils optimize command, .optimize() and .detect_fts() table methods
This commit is contained in:
parent
015bd2a840
commit
0a8194e730
7 changed files with 146 additions and 4 deletions
15
docs/cli.rst
15
docs/cli.rst
|
|
@ -27,3 +27,18 @@ Vacuum
|
|||
You can run VACUUM to optimize your database like so::
|
||||
|
||||
$ sqlite-utils vacuum mydb.db
|
||||
|
||||
Optimize
|
||||
========
|
||||
|
||||
The optimize command can dramatically reduce the size of your database if you are using SQLite full-text search. It runs OPTIMIZE against all of our FTS4 and FTS5 tables, then runs VACUUM.
|
||||
|
||||
If you just want to run OPTIMIZE without the VACUUM, use the ``--no-vacuum`` flag.
|
||||
|
||||
::
|
||||
|
||||
# Optimize all FTS tables and then VACUUM
|
||||
$ sqlite-utils optimize mydb.db
|
||||
|
||||
# Optimize but skip the VACUUM
|
||||
$ sqlite-utils optimize --no-vacuum mydb.db
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue