From: drh <> Date: Tue, 3 Feb 2026 17:21:59 +0000 (+0000) Subject: Improve the query planner by reducing the estimated number of output rows X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=761118497ab87bd10b1b028d4ca41bda96b5017f;p=thirdparty%2Fsqlite.git Improve the query planner by reducing the estimated number of output rows for each stage of a join if there are LIKE, GLOB, REGEXP, or MATCH constraints on the table where the pattern string is a constant. The reduction in the output row estimate is proportional to the length of the pattern string. FossilOrigin-Name: 6852843e6aa23051de0884593ce64b96a16f16c4d63b222bd324297581f7cf75 --- 761118497ab87bd10b1b028d4ca41bda96b5017f diff --cc manifest index b14936cd85,e94816700b..db7f8cc660 --- a/manifest +++ b/manifest @@@ -1,5 -1,5 +1,5 @@@ - C Minor\schange\sto\stest/dotcmd01.test\sso\sthat\sit\sworks\swith\sSTAT4. - D 2026-02-03T17:07:28.257 -C Improved\scomments\son\sthis\senhancement.\s\sNo\scode\schanges. -D 2026-02-03T16:29:14.441 ++C Improve\sthe\squery\splanner\sby\sreducing\sthe\sestimated\snumber\sof\soutput\srows\nfor\seach\sstage\sof\sa\sjoin\sif\sthere\sare\sLIKE,\sGLOB,\sREGEXP,\sor\sMATCH\nconstraints\son\sthe\stable\swhere\sthe\spattern\sstring\sis\sa\sconstant.\s\sThe\nreduction\sin\sthe\soutput\srow\sestimate\sis\sproportional\sto\sthe\slength\sof\nthe\spattern\sstring. ++D 2026-02-03T17:21:59.699 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@@ -2194,8 -2194,8 +2194,9 @@@ F tool/warnings-clang.sh bbf6a1e685e534 F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c - P 619060c2267a889089bf5328ba83640806688164a096df8582a5cf91b173741d - R 971a6a06931dcbfd5e0803267961b549 -P 96f8ce225ee863c6dfe0df2d10da27a35407128d7c4691ddb927401465047a6e -R 76804c59016d6439c4b864d493284e2f ++P 8aaf5b6b6c3d71789eebd2b8f440dd2fdaad2ef2adc9c7b2b019f08853d0b195 510a6738e5d186a74a45fa7385f4722f4e090d85562f259b02c49393ca56860b ++R 029e1e172165301b2bc0a3bca8bb2f42 ++T +closed 510a6738e5d186a74a45fa7385f4722f4e090d85562f259b02c49393ca56860b U drh - Z b6684e32a3d0d6883283ef0b1bce9008 -Z 13cfba3f1eb38fdd6d8eef60dbdf3efd ++Z 160dfcf3845ec6e10ab58cf4182fb30d # Remove this line to create a well-formed Fossil manifest. diff --cc manifest.uuid index 5a383cdc5b,fd9c80b3b6..b9f12e0bf1 --- a/manifest.uuid +++ b/manifest.uuid @@@ -1,1 -1,1 +1,1 @@@ - 8aaf5b6b6c3d71789eebd2b8f440dd2fdaad2ef2adc9c7b2b019f08853d0b195 -510a6738e5d186a74a45fa7385f4722f4e090d85562f259b02c49393ca56860b ++6852843e6aa23051de0884593ce64b96a16f16c4d63b222bd324297581f7cf75