mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Query planner tuning: Increase the maximum number of simultaneous solutions
to track int eh solver from 10 to 12. FossilOrigin-Name: fe2e1dadbacbe6392ceed44fd287a2ed82189cb8055f35631d37967d9a7a5d1d
This commit is contained in:
14
src/where.c
14
src/where.c
@ -5242,10 +5242,16 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
|
||||
|
||||
pParse = pWInfo->pParse;
|
||||
nLoop = pWInfo->nLevel;
|
||||
/* TUNING: For simple queries, only the best path is tracked.
|
||||
** For 2-way joins, the 5 best paths are followed.
|
||||
** For joins of 3 or more tables, track the 10 best paths */
|
||||
mxChoice = (nLoop<=1) ? 1 : (nLoop==2 ? 5 : 10);
|
||||
/* TUNING: mxChoice is the maximum number of possible paths to preserve
|
||||
** at each step. Based on the number of loops in the FROM clause:
|
||||
**
|
||||
** nLoop mxChoice
|
||||
** ----- --------
|
||||
** 1 1 // the most common case
|
||||
** 2 5
|
||||
** 3+ 12
|
||||
*/
|
||||
mxChoice = (nLoop<=1) ? 1 : (nLoop==2 ? 5 : 12);
|
||||
assert( nLoop<=pWInfo->pTabList->nSrc );
|
||||
WHERETRACE(0x002, ("---- begin solver. (nRowEst=%d, nQueryLoop=%d)\n",
|
||||
nRowEst, pParse->nQueryLoop));
|
||||
|
Reference in New Issue
Block a user