diff options
author | drh <drh@noemail.net> | 2016-08-26 19:54:12 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-08-26 19:54:12 +0000 |
commit | 363fb95bc38825f49317532fe90241a172e1cf45 (patch) | |
tree | a5c1fcdffd92b7e514c88bcd39f5662e22be26e5 /src/expr.c | |
parent | 4b4f51148ae48c263027f2c269ff53e6bea1b8d9 (diff) | |
download | sqlite-363fb95bc38825f49317532fe90241a172e1cf45.tar.gz sqlite-363fb95bc38825f49317532fe90241a172e1cf45.zip |
Add an EXPLAIN QUERY PLAN line for when a index is used to implement
an IN operator.
FossilOrigin-Name: 171aa833a2e1650c3d9cf9bd6438ae46f6c35871
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c index 3a5075719..08b72fed8 100644 --- a/src/expr.c +++ b/src/expr.c @@ -2229,6 +2229,11 @@ int sqlite3FindInIndex( if( i==nExpr ){ int iAddr = sqlite3CodeOnce(pParse); VdbeCoverage(v); +#ifndef SQLITE_OMIT_EXPLAIN + sqlite3VdbeAddOp4(v, OP_Explain, 0, 0, 0, + sqlite3MPrintf(db, "USING INDEX %s FOR IN-OPERATOR", pIdx->zName), + P4_DYNAMIC); +#endif sqlite3VdbeAddOp3(v, OP_OpenRead, iTab, pIdx->tnum, iDb); sqlite3VdbeSetP4KeyInfo(pParse, pIdx); VdbeComment((v, "%s", pIdx->zName)); |