1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Demonstration code on a possible technique for optimizing the use of IN

operator on columns to the right of multicolumn indexes.  If the OP_Noop
generated where were really a new opcode that checked to see if there existed
any entries in the index with a matching prefix, it might prevent unnecessary
iterations of the IN operator.

FossilOrigin-Name: 92f0fe155d5546fc7f4a443d0630613dabe149061966308e5420fad652278f16
This commit is contained in:
drh
2018-05-30 00:54:23 +00:00
parent ea93e2804d
commit a0368d9396
5 changed files with 21 additions and 10 deletions

View File

@@ -592,6 +592,8 @@ static int codeEqualityTerm(
if( i==iEq ){
pIn->iCur = iTab;
pIn->eEndLoopOp = bRev ? OP_PrevIfOpen : OP_NextIfOpen;
pIn->iBase = iReg - i;
pIn->nPrefix = i;
}else{
pIn->eEndLoopOp = OP_Noop;
}