diff options
author | drh <drh@noemail.net> | 2017-06-24 16:03:18 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-06-24 16:03:18 +0000 |
commit | 54ac445d53512b3215ed41f8594815a46f9005cc (patch) | |
tree | aa0fbf40eee2c365cb9ee5c5c971beccd1c5c903 /src | |
parent | 45e7d7dd1c50a99a1a9b989ece56e4b7533b386e (diff) | |
download | sqlite-54ac445d53512b3215ed41f8594815a46f9005cc.tar.gz sqlite-54ac445d53512b3215ed41f8594815a46f9005cc.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/where.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/where.c b/src/where.c index 1cd5d7033..41bcb3031 100644 --- a/src/where.c +++ b/src/where.c @@ -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 |