SqlExec
Run the SQL statement or statements specified in the P4 string.
An example
1 of the 178 statements we compiled against the sample database use SqlExec. This is the one with the shortest program; the rows that use SqlExec are highlighted.
PRAGMA optimize
| addr | opcode | p1 | p2 | p3 | p4 | p5 |
|---|---|---|---|---|---|---|
| 0 | Init | 0 | 25 | 0 | 0 | |
| 1 | Expire | 1 | 1 | 0 | 0 | |
| 2 | OpenRead | 0 | 16 | 0 | k(2,,) | 0 |
| 3 | Rewind | 0 | 5 | 0 | 0 | |
| 4 | SqlExec | 2 | 2000 | 0 | ANALYZE "main"."playlist_tracks" | 0 |
| 5 | OpenRead | 0 | 23 | 0 | 6 | 0 |
| 6 | Rewind | 0 | 8 | 0 | 0 | |
| 7 | SqlExec | 2 | 2000 | 0 | ANALYZE "main"."lyrics_segdir" | 0 |
| 8 | OpenRead | 0 | 13 | 0 | 3 | 0 |
| 9 | Rewind | 0 | 11 | 0 | 0 | |
| 10 | SqlExec | 2 | 2000 | 0 | ANALYZE "main"."playlists" | 0 |
| 11 | OpenRead | 0 | 9 | 0 | k(1,) | 0 |
| 12 | Rewind | 0 | 14 | 0 | 0 | |
| 13 | SqlExec | 2 | 2000 | 0 | ANALYZE "main"."genres" | 0 |
| 14 | OpenRead | 0 | 17 | 0 | 4 | 0 |
| 15 | Rewind | 0 | 17 | 0 | 0 | |
| 16 | SqlExec | 2 | 2000 | 0 | ANALYZE "main"."sales" | 0 |
| 17 | OpenRead | 0 | 2 | 0 | 3 | 0 |
| 18 | Rewind | 0 | 20 | 0 | 0 | |
| 19 | SqlExec | 2 | 2000 | 0 | ANALYZE "main"."artists" | 0 |
| 20 | OpenRead | 0 | 4 | 0 | 6 | 0 |
| 21 | Rewind | 0 | 23 | 0 | 0 | |
| 22 | SqlExec | 2 | 2000 | 0 | ANALYZE "main"."tracks" | 0 |
| 23 | Expire | 0 | 0 | 0 | 0 | |
| 24 | Halt | 0 | 0 | 0 | 0 | |
| 25 | Transaction | 0 | 1 | 1 | 0 | 1 |
| 26 | Goto | 0 | 1 | 0 | 0 |
Open it in the EXPLAIN visualizer →
Also in this program: Expire, Goto, Halt, Init, OpenRead, Rewind, Transaction.
What the SQLite documentation says
Run the SQL statement or statements specified in the P4 string.
The P1 parameter is a bitmask of options:
0x0001 Disable Auth and Trace callbacks while the statements in P4 are running.
0x0002 Set db->nAnalysisLimit to P2 while the statements in P4 are running.
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.
← SorterSort · String →