aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-05-28 18:53:36 +0000
committerdrh <>2024-05-28 18:53:36 +0000
commit05665e9de9ee326254d43666d260e319f2bc50c1 (patch)
treef96586e1982ebe83d02139b9f5cbd3483d7f958a /src
parentefe474af97decf22821c8b5249075101bd7feea5 (diff)
downloadsqlite-05665e9de9ee326254d43666d260e319f2bc50c1.tar.gz
sqlite-05665e9de9ee326254d43666d260e319f2bc50c1.zip
Tweaks to the query planner so that it is better able to deal with star
queries with many dimensions and bad indexes. FossilOrigin-Name: 1e49081001f93b75ee499536f8a61a0f49225a1745117bb9267249c38c4bf803
Diffstat (limited to 'src')
-rw-r--r--src/where.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/where.c b/src/where.c
index fc4a88eab..aa21b0655 100644
--- a/src/where.c
+++ b/src/where.c
@@ -5286,9 +5286,9 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
** ----- --------
** 1 1 // the most common case
** 2 5
- ** 3+ 20
+ ** 3+ 8*(N-2)
*/
- mxChoice = (nLoop<=1) ? 1 : (nLoop==2 ? 5 : 20);
+ mxChoice = (nLoop<=1) ? 1 : (nLoop==2 ? 5 : 8*(nLoop-2));
assert( nLoop<=pWInfo->pTabList->nSrc );
WHERETRACE(0x002, ("---- begin solver. (nRowEst=%d, nQueryLoop=%d)\n",
nRowEst, pParse->nQueryLoop));