mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Adjust the cost estimates for RTREE such that the expected number of rows and
expected cost is halved for each additional constraint. FossilOrigin-Name: fd7cd0609381a85673d1f737ebeb19dde3de180f
This commit is contained in:
@ -1741,7 +1741,7 @@ static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
|
||||
nRow = pRtree->nRowEst / (iIdx + 1);
|
||||
nRow = pRtree->nRowEst >> (iIdx/2);
|
||||
pIdxInfo->estimatedCost = (double)6.0 * (double)nRow;
|
||||
setEstimatedRows(pIdxInfo, nRow);
|
||||
|
||||
|
Reference in New Issue
Block a user