1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

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
This commit is contained in:
drh
2024-05-28 18:53:36 +00:00
parent efe474af97
commit 05665e9de9
3 changed files with 9 additions and 9 deletions

View File

@ -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));