diff options
author | drh <drh@noemail.net> | 2018-05-30 00:54:23 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-05-30 00:54:23 +0000 |
commit | a0368d9396ea3c8cb80f902cacb7594039909bb2 (patch) | |
tree | 0af5c0f2f2ea85760987c67c7123638b178a167a /src/wherecode.c | |
parent | ea93e2804d46ae1279c7112505eab55579b40dc9 (diff) | |
download | sqlite-a0368d9396ea3c8cb80f902cacb7594039909bb2.tar.gz sqlite-a0368d9396ea3c8cb80f902cacb7594039909bb2.zip |
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
Diffstat (limited to 'src/wherecode.c')
-rw-r--r-- | src/wherecode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wherecode.c b/src/wherecode.c index c9edab7b0..157812247 100644 --- a/src/wherecode.c +++ b/src/wherecode.c @@ -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; } |