SQLite VDBE opcode

OpenAutoindex

This opcode works the same as OpenEphemeral.

An example

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

SELECT a.name, b.title FROM artists a LEFT JOIN albums b ON b.artist_id = a.id
addropcodep1p2p3p4p5
0Init03100
1OpenRead260k(2,,)0
2OpenRead13040
3Rewind230100
4Once01600
5OpenAutoindex330k(3,B,,)0
6Explain600BLOOM FILTER ON b (artist_id=?)0
7Blob10000100
8Rewind11600
9Column1130
10Column1240
11Rowid1500
12MakeRecord3320
13FilterAdd10310
14IdxInsert32016
15Next1903
16Integer0600
17IdxRowid2700
18Filter126710
19SeekGE326710
20IdxGT326710
21Integer1600
22Column2080
23Column3190
24ResultRow8200
25Next32000
26IfPos62900
27NullRow3000
28Goto02100
29Next2401
30Halt0000
31Transaction00101
32Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Blob, Column, Explain, Filter, FilterAdd, Goto, Halt, IdxGT, IdxInsert, IdxRowid, IfPos, Init, Integer, MakeRecord, Next, NullRow, Once, OpenRead, ResultRow, Rewind, Rowid, SeekGE, Transaction.

What the SQLite documentation says

This opcode works the same as OpenEphemeral. It has a different name to distinguish its use. Tables created using by this opcode will be used for automatically created transient indices in joins.

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.

← Once · OpenDup →