1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Query planner tuning: When deciding between two plans with the same cost,

bias the selection toward the one that does not use the sorter.

FossilOrigin-Name: f0ec36d479ac4efaa0efd0594d032dd7b8ccdf84a4dc3644cd688762186fbcca
This commit is contained in:
drh
2017-06-24 16:03:18 +00:00
parent 45e7d7dd1c
commit 54ac445d53
3 changed files with 8 additions and 7 deletions

View File

@@ -3972,6 +3972,7 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){
rUnsorted, rCost));
}else{
rCost = rUnsorted;
rUnsorted -= 2; /* TUNING: Slight bias in favor of no-sort plans */
}
/* Check to see if pWLoop should be added to the set of