SQLite VDBE opcode

Vacuum

Vacuum the entire database P1.

An example

2 of the 178 statements we compiled against the sample database use Vacuum. This is the one with the shortest program; the rows that use Vacuum are highlighted.

VACUUM
addropcodep1p2p3p4p5
0Init0300
1Vacuum0000
2Halt0000
3Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Goto, Halt, Init.

What the SQLite documentation says

Vacuum the entire database P1. P1 is 0 for "main", and 2 or more for an attached database. The "temp" database may not be vacuumed.

If P2 is not zero, then it is a register holding a string which is the file into which the result of vacuum should be written. When P2 is zero, the vacuum overwrites the original database.

From sqlite.org's list of opcodes for SQLite 3.54.1, in the public domain. Opcodes are not a stable interface and change between releases.

← TypeCheck · Variable →