From: drh <> Date: Fri, 16 Aug 2024 18:51:46 +0000 (+0000) Subject: If a subquery has an ORDER BY clause and that ordering is helpfile in X-Git-Tag: version-3.47.0~226 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65a46af7ae11ffe430519dec1aa8aee9c9281376;p=thirdparty%2Fsqlite.git If a subquery has an ORDER BY clause and that ordering is helpfile in satisfying the ORDER BY or GROUP BY of the outer query without doing an extra sort, then omit or reduce the sort in the outer query. Call this the "order-by-subquery optimization". FossilOrigin-Name: 7a0cdc7edb704a88a77b748cd28f6e00c49849cc2c1af838b95b34232ecc21f9 --- 65a46af7ae11ffe430519dec1aa8aee9c9281376 diff --cc manifest index 6e81c8e8bf,3d86a9c04b..dd7e947eb5 --- a/manifest +++ b/manifest @@@ -1,5 -1,5 +1,5 @@@ - C Ensure\sthat\smemory\sallocations\sin\sANALYZE\sare\salways\s8-byte\saligned\sin\sorder\nto\ssatisfy\sa\snew\sassert()\sadded\sby\s[539e4f661767ef90]. - D 2024-08-16T15:35:20.377 -C Fix\shandling\sof\sCOLLATE.\s\sAdd\stest\scases\sfor\sthe\ssame.\s\sCode\scleanup\sfor\nimproved\sunderstandability\sand\smaintainability. -D 2024-08-16T11:26:21.307 ++C If\sa\ssubquery\shas\san\sORDER\sBY\sclause\sand\sthat\sordering\sis\shelpfile\sin\nsatisfying\sthe\sORDER\sBY\sor\sGROUP\sBY\sof\sthe\souter\squery\swithout\sdoing\san\nextra\ssort,\sthen\somit\sor\sreduce\sthe\ssort\sin\sthe\souter\squery.\s\sCall\nthis\sthe\s"order-by-subquery\soptimization". ++D 2024-08-16T18:51:46.975 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@@ -2204,8 -2205,8 +2205,9 @@@ F vsixtest/vsixtest.tcl 6195aba1f12a5e1 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 - P 96e6cfb211f7f1aab50f997f4bc61dfb9701beb720c59bc413a4285c1ae5e20d - R 19ca743d0eb81a004946ea85e6f05b5d -P 5a9a3b8af7ac0aa1c04ad2d735e341c92d67952acb9a1d30217c0471e92cd468 -R 7950e16a6ca37805979b1472a80cc190 ++P a1915cbdeccac2ed49fb8a9733abf2c6239396e3174fed2ff275f66b606c48b6 41a41c173a9d15d94f23d73a5c04bfb1616cb9223bc81d41808f9b4d00817fbf ++R a24a84e9d7ceff04c159b78242edac9d ++T +closed 41a41c173a9d15d94f23d73a5c04bfb1616cb9223bc81d41808f9b4d00817fbf U drh - Z b629a1d86492e4c09b552ad5721d3d89 -Z 14a0d323dd6fe70b6ed40930f5fa77fd ++Z 169fa841b16225f819f8996d6765647e # Remove this line to create a well-formed Fossil manifest. diff --cc manifest.uuid index edb9927377,b684817cd4..d32d2498e4 --- a/manifest.uuid +++ b/manifest.uuid @@@ -1,1 -1,1 +1,1 @@@ - a1915cbdeccac2ed49fb8a9733abf2c6239396e3174fed2ff275f66b606c48b6 -41a41c173a9d15d94f23d73a5c04bfb1616cb9223bc81d41808f9b4d00817fbf ++7a0cdc7edb704a88a77b748cd28f6e00c49849cc2c1af838b95b34232ecc21f9