Pagecount
Write the current number of pages in database P1 to memory cell P2.
An example
1 of the 178 statements we compiled against the sample database use Pagecount. This is the one with the shortest program; the rows that use Pagecount are highlighted.
PRAGMA page_count
| addr | opcode | p1 | p2 | p3 | p4 | p5 |
|---|---|---|---|---|---|---|
| 0 | Init | 0 | 5 | 0 | 0 | |
| 1 | Expire | 1 | 1 | 0 | 0 | |
| 2 | Pagecount | 0 | 3 | 0 | 0 | |
| 3 | ResultRow | 3 | 1 | 0 | 0 | |
| 4 | Halt | 0 | 0 | 0 | 0 | |
| 5 | Transaction | 0 | 0 | 1 | 0 | 1 |
| 6 | Goto | 0 | 1 | 0 | 0 |
Open it in the EXPLAIN visualizer →
Also in this program: Expire, Goto, Halt, Init, ResultRow, Transaction.
What the SQLite documentation says
Write the current number of pages in database P1 to memory cell P2.
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.