SQLite VDBE opcode

DropIndex

Remove the internal (in-memory) data structures that describe the index named P4 in database P1.

An example

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

DROP INDEX tracks_album
addropcodep1p2p3p4p5
0Init03700
1Null0100
2OpenWrite01050
3Rewind01100
4Column0120
5Ne3102BINARY-882
6Column0020
7Ne4102BINARY-882
8Rowid0500
9Delete0002
10Next0401
11SetCookie0120
12Destroy5200
13Null0670
14OpenEphemeral2060
15IfNot22310
16OpenRead11040
17Rewind12300
18Column13130
19Ne22213BINARY-884
20Rowid1700
21Insert2670
22Next11801
23OpenWrite11050
24Rewind23500
25Rowid2700
26NotExists13470
27Column1080
28Column1190
29Column12100
30Integer51100
31Column14120
32MakeRecord8515BBBDB0
33Insert11570
34Next22500
35DropIndex000tracks_album0
36Halt0000
37Transaction01101
38String8030tracks_album0
39String8040index0
40Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Column, Delete, Destroy, Goto, Halt, IfNot, Init, Insert, Integer, MakeRecord, Ne, Next, NotExists, Null, OpenEphemeral, OpenRead, OpenWrite, Rewind, Rowid, SetCookie, String8, Transaction.

What the SQLite documentation says

Remove the internal (in-memory) data structures that describe the index named P4 in database P1. This is called after an index is dropped from disk (using the Destroy opcode) in order to keep the internal representation of the schema consistent with what is on disk.

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.

← Divide · DropTable →