SQLite VDBE opcode

SeekHit

Increase or decrease the seekHit value for cursor P1, if necessary, so that it is no less than P2 and no greater than P3.

An example

None of the 178 statements we compiled against the sample database with SQLite 3.54.1 uses SeekHit. Some opcodes appear only in debugging builds or with particular compile-time options, and some only in rare query plans.

What the SQLite documentation says

Increase or decrease the seekHit value for cursor P1, if necessary, so that it is no less than P2 and no greater than P3.

The seekHit integer represents the maximum of terms in an index for which there is known to be at least one match. If the seekHit value is smaller than the total number of equality terms in an index lookup, then the IfNoHope opcode might run to see if the IN loop can be abandoned early, thus saving work. This is part of the IN-early-out optimization.

P1 must be a valid b-tree cursor.

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.

← SeekGT · SeekLE →