1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Add an EXPLAIN QUERY PLAN line for when a index is used to implement

an IN operator.

FossilOrigin-Name: 171aa833a2e1650c3d9cf9bd6438ae46f6c35871
This commit is contained in:
drh
2016-08-26 19:54:12 +00:00
parent 4b4f51148a
commit 363fb95bc3
3 changed files with 13 additions and 8 deletions

View File

@@ -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));