mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 18:04:32 +02:00
Added vacuum to CLI and Python API
This commit is contained in:
parent
fd5829b27d
commit
231224ba1a
6 changed files with 40 additions and 0 deletions
|
|
@ -15,3 +15,10 @@ You can list the names of tables in a database using the ``table_names`` subcomm
|
|||
dogs
|
||||
cats
|
||||
chickens
|
||||
|
||||
Vacuum
|
||||
======
|
||||
|
||||
You can run VACUUM to optimize your database like so::
|
||||
|
||||
$ sqlite-utils vacuum mydb.db
|
||||
|
|
|
|||
|
|
@ -313,3 +313,12 @@ By default the index will be named ``idx_{table-name}_{columns}`` - if you want
|
|||
["is_good_dog", "age"],
|
||||
index_name="good_dogs_by_age"
|
||||
)
|
||||
|
||||
Vacuum
|
||||
======
|
||||
|
||||
You can optimize your database by running VACUUM against it like so:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
Database("my_database.py").vacuum()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue