]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Generalize the min/max optimization so that if an appropriate index exists,
authordrh <drh@noemail.net>
Thu, 13 Dec 2012 18:57:31 +0000 (18:57 +0000)
committerdrh <drh@noemail.net>
Thu, 13 Dec 2012 18:57:31 +0000 (18:57 +0000)
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

1  2 
manifest
manifest.uuid

diff --cc manifest
index 625ee0ceaa59450ab23acf9991930e5d2118f08c,a4ed9e2e1c429ddcb667a144af2d3cda0e0702f6..e9e164b948135d673b6aff805e2ec247bd094b5a
+++ 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 086ee95efe4c2f63e825fbebb50faa6fa3d331f0,47b9352d93a6b29e6b6ccc6226829358788fe40d..af816cef7325d23b7efdc46906f346bc30825613
@@@ -1,1 -1,1 +1,1 @@@
- 8bcf5f51d8a6ea47ba4eb8de001d7a30e0a5f2c3
 -7280e14cd8f55896451847b432171e8750a07c81
++52e755943f87354febe214e5dc3b423a1e38ba80