1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Attempt to use a covering index even on a full table scan, under the theory

that the index will be smaller and require less disk I/O and thus be faster.

FossilOrigin-Name: cfaa7bc12847a7006ccc93815f2395ad5259744a
This commit is contained in:
drh
2012-09-15 18:45:54 +00:00
parent 55b4c226d1
commit 3f4d1d1b02
23 changed files with 121 additions and 94 deletions

View File

@ -51,7 +51,7 @@ foreach idxmode {ordered unordered} {
0 0 0 {USE TEMP B-TREE FOR ORDER BY}}
4 "SELECT max(a) FROM t1"
{0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i1 (~1 rows)}}
{0 0 0 {SEARCH TABLE t1 (~1 rows)}}
{0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i1 (~1 rows)}}
5 "SELECT group_concat(b) FROM t1 GROUP BY a"
{0 0 0 {SCAN TABLE t1 USING INDEX i1 (~128 rows)}}
{0 0 0 {SCAN TABLE t1 (~128 rows)} 0 0 0 {USE TEMP B-TREE FOR GROUP BY}}