mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 09:54:31 +02:00
Tools for enabling and disabling WAL, closes #132
This commit is contained in:
parent
957f8c9b4c
commit
2d2d724e32
5 changed files with 115 additions and 0 deletions
19
docs/cli.rst
19
docs/cli.rst
|
|
@ -684,6 +684,8 @@ To remove the FTS tables and triggers you created, use ``disable-fts``::
|
|||
|
||||
$ sqlite-utils disable-fts mydb.db documents
|
||||
|
||||
.. _cli_vacuum:
|
||||
|
||||
Vacuum
|
||||
======
|
||||
|
||||
|
|
@ -691,6 +693,8 @@ You can run VACUUM to optimize your database like so::
|
|||
|
||||
$ sqlite-utils vacuum mydb.db
|
||||
|
||||
.. _cli_optimize:
|
||||
|
||||
Optimize
|
||||
========
|
||||
|
||||
|
|
@ -705,3 +709,18 @@ If you just want to run OPTIMIZE without the VACUUM, use the ``--no-vacuum`` fla
|
|||
|
||||
# Optimize but skip the VACUUM
|
||||
$ sqlite-utils optimize --no-vacuum mydb.db
|
||||
|
||||
.. _cli_wal:
|
||||
|
||||
WAL mode
|
||||
========
|
||||
|
||||
You can enable `Write-Ahead Logging <https://www.sqlite.org/wal.html>`__ for a database file using the ``enable-wal`` command::
|
||||
|
||||
$ sqlite-utils enable-wal mydb.db
|
||||
|
||||
You can disable WAL mode using ``disable-wal``::
|
||||
|
||||
$ sqlite-utils disable-wal mydb.db
|
||||
|
||||
Both of these commands accept one or more database files as arguments.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue