aboutsummaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-06-08 18:07:21 +0000
committerdrh <drh@noemail.net>2016-06-08 18:07:21 +0000
commit8dc570b6afac593f029a67640ab916278af1ca65 (patch)
tree4d6a195a8041206b248fd273ca16ce8ae82b72f9 /src/where.c
parentb9f3f6b672b4dbf11617e0d9872e36773f72e9a6 (diff)
downloadsqlite-8dc570b6afac593f029a67640ab916278af1ca65.tar.gz
sqlite-8dc570b6afac593f029a67640ab916278af1ca65.zip
Prefer to use partial indexes for full table scans when that is possible.
FossilOrigin-Name: fe1874321ba31cec9ae65387920c33d8d0178ed8
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/where.c b/src/where.c
index 04d0b0190..e5a476c00 100644
--- a/src/where.c
+++ b/src/where.c
@@ -2761,6 +2761,7 @@ static int whereLoopAddBtree(
/* Full scan via index */
if( b
|| !HasRowid(pTab)
+ || pProbe->pPartIdxWhere!=0
|| ( m==0
&& pProbe->bUnordered==0
&& (pProbe->szIdxRow<pTab->szTabRow)