diff options
author | drh <drh@noemail.net> | 2005-11-21 12:46:27 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2005-11-21 12:46:27 +0000 |
commit | 36d649303feb066fddbfb718b66c8900d4088ad2 (patch) | |
tree | fa10fc2e6aa57a4ed1fef1b0343fdf5ff22286bc /src | |
parent | 4efc083f5754d1ec54af00115cf9373dc39c64ae (diff) | |
download | sqlite-36d649303feb066fddbfb718b66c8900d4088ad2.tar.gz sqlite-36d649303feb066fddbfb718b66c8900d4088ad2.zip |
The EXPLAIN QUERY PLAN now identifies when tables use the integer primary key. (CVS 2771)
FossilOrigin-Name: 80721e2c9033abb2e9eed32892c4e486c293e1fa
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c index 481902306..813d40e25 100644 --- a/src/where.c +++ b/src/where.c @@ -16,7 +16,7 @@ ** so is applicable. Because this module is responsible for selecting ** indices, you might also think of this module as the "query optimizer". ** -** $Id: where.c,v 1.181 2005/11/14 22:29:06 drh Exp $ +** $Id: where.c,v 1.182 2005/11/21 12:46:27 drh Exp $ */ #include "sqliteInt.h" @@ -1550,6 +1550,8 @@ WhereInfo *sqlite3WhereBegin( } if( (pIx = pLevel->pIdx)!=0 ){ zMsg = sqlite3MPrintf("%z WITH INDEX %s", zMsg, pIx->zName); + }else if( pLevel->flags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){ + zMsg = sqlite3MPrintf("%z USING INTEGER PRIMARY KEY", zMsg); } sqlite3VdbeOp3(v, OP_Explain, i, pLevel->iFrom, zMsg, P3_DYNAMIC); } |