From: drh Date: Thu, 13 Dec 2012 18:57:31 +0000 (+0000) Subject: Generalize the min/max optimization so that if an appropriate index exists, X-Git-Tag: version-3.7.16~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3256037ff420f5b333de9d7a1804174f9f40282;p=thirdparty%2Fsqlite.git Generalize the min/max optimization so that if an appropriate index exists, the index it can be used by any aggregate query that contains only a single max() or min() and does not contain a GROUP BY clause. FossilOrigin-Name: 52e755943f87354febe214e5dc3b423a1e38ba80 --- b3256037ff420f5b333de9d7a1804174f9f40282 diff --cc manifest index 625ee0ceaa,a4ed9e2e1c..e9e164b948 --- a/manifest +++ b/manifest @@@ -1,5 -1,5 +1,5 @@@ - C Increase\sthe\sversion\snumber\sto\s3.7.16\sin\sadvance\sof\sadding\snew\sfeatures\nfor\sthe\snext\srelease. - D 2012-12-13T18:51:53.652 -C Attempt\sto\sfurther\sgeneralize\sthe\smin/max\soptimization\sso\sthat,\sif\san\sappropriate\sindex\sexists,\sit\scan\sbe\sused\sby\sany\saggregate\squery\sthat\scontains\sonly\sa\ssingle\saggregate\sof\sthe\sform\smax(colname)\sor\smin(colname)\sand\sdoes\snot\scontain\sa\sGROUP\sBY\sclause. -D 2012-12-13T16:37:10.621 ++C Generalize\sthe\smin/max\soptimization\sso\sthat\sif\san\sappropriate\sindex\sexists,\nthe\sindex\sit\scan\sbe\sused\sby\sany\saggregate\squery\sthat\scontains\sonly\sa\ssingle\nmax()\sor\smin()\sand\sdoes\snot\scontain\sa\sGROUP\sBY\sclause. ++D 2012-12-13T18:57:31.980 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 690d441a758cbffd13e814dc2724a721a6ebd400 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@@ -1025,7 -1025,10 +1025,7 @@@ F tool/vdbe-compress.tcl f12c884766bd14 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac --P 120c82d56ecb574f46db01679317b8062d8779ed - R b094590aecd4a0f996453171da31d150 -R 39203e605a8f25e92556c6b1c71c785c -T *branch * minmax-opt -T *sym-minmax-opt * -T -sym-trunk * -U dan -Z ab1716797ba85b3e90d83237db257cf3 ++P 8bcf5f51d8a6ea47ba4eb8de001d7a30e0a5f2c3 7280e14cd8f55896451847b432171e8750a07c81 ++R dd1fb1ab301b504c23fc61d7da06adfc +U drh - Z 0c1a6c038401cf9c1a2250c525824afb ++Z c76dfaa5ec5d18c5fce102d2fd745bf3 diff --cc manifest.uuid index 086ee95efe,47b9352d93..af816cef73 --- a/manifest.uuid +++ b/manifest.uuid @@@ -1,1 -1,1 +1,1 @@@ - 8bcf5f51d8a6ea47ba4eb8de001d7a30e0a5f2c3 -7280e14cd8f55896451847b432171e8750a07c81 ++52e755943f87354febe214e5dc3b423a1e38ba80