]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add comments identifing where the skip-scan option is decided in the
authordrh <drh@noemail.net>
Mon, 18 Nov 2013 19:32:15 +0000 (19:32 +0000)
committerdrh <drh@noemail.net>
Mon, 18 Nov 2013 19:32:15 +0000 (19:32 +0000)
query planner, to aid in tuning that decision.  No changes to code.

FossilOrigin-Name: e9df04cec48bb8b4ea26ec9024a22ea42b2338eb

manifest
manifest.uuid
src/where.c

index ec98f2b85119ef09e0414f9816913bf9f406526b..5015b49889c19bb867fa9fa2cb29983b7cef23f4 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sdocumentation\stypos.\s\sNo\schanges\sto\scode.
-D 2013-11-18T18:48:50.010
+C Add\scomments\sidentifing\swhere\sthe\sskip-scan\soption\sis\sdecided\sin\sthe\nquery\splanner,\sto\said\sin\stuning\sthat\sdecision.\s\sNo\schanges\sto\scode.
+D 2013-11-18T19:32:15.750
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 8a07bebafbfda0eb67728f4bd15a36201662d1a1
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -293,7 +293,7 @@ F src/vtab.c 21b932841e51ebd7d075e2d0ad1415dce8d2d5fd
 F src/wal.c 7dc3966ef98b74422267e7e6e46e07ff6c6eb1b4
 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
 F src/walker.c e9e593d5bb798c3e67fc3893dfe7055c9e7d8d74
-F src/where.c de64e326bb2a07e5591900b11a93d743df2a6919
+F src/where.c c0a9bab3e783ecab6add9d08430dd5414810f2fe
 F src/whereInt.h 96a75c61f1d2b9d4a8e4bb17d89deb0cf7cba358
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -1140,7 +1140,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 8d002740bffca2a76d2dfbc1a67293d34f9de9ba
-R d98b977ab05ba38a226703beb7c26537
+P 7caeb09c52bde4649b02b339f611c8e30f6d1c68
+R 05f4e654e5dee11a1ac27e9ef3c549a9
 U drh
-Z c53e0578e3a1f9608c085ee4cd6a5e4a
+Z b6f4e67d2e374e89823b36eebb6a35ba
index 5126360f83528c077956f76ac0254bd7fdef8ae4..8f6426f507e5f8fe66057e11a25c821810db70d0 100644 (file)
@@ -1 +1 @@
-7caeb09c52bde4649b02b339f611c8e30f6d1c68
\ No newline at end of file
+e9df04cec48bb8b4ea26ec9024a22ea42b2338eb
\ No newline at end of file
index ba6e5e0c4671f9c4abdfdd3c884b8b1666525a46..a163895bb7d6a047e3071864edfee27cdfe94cb9 100644 (file)
@@ -3918,10 +3918,15 @@ static int whereLoopAddBtreeIndex(
   saved_nOut = pNew->nOut;
   pNew->rSetup = 0;
   rLogSize = estLog(sqlite3LogEst(pProbe->aiRowEst[0]));
+
+  /* Consider using a skip-scan if there are no WHERE clause constraints
+  ** available for the left-most terms of the index, and if the average
+  ** number of repeats in the left-most terms is at least 50.
+  */
   if( pTerm==0
    && saved_nEq==saved_nSkip
    && saved_nEq+1<pProbe->nKeyCol
-   && pProbe->aiRowEst[saved_nEq+1]>50
+   && pProbe->aiRowEst[saved_nEq+1]>50  /* TUNING: Minimum for skip-scan */
   ){
     LogEst nIter;
     pNew->u.btree.nEq++;