Fix the wholenumber virtual table so that it returns higher costs for

unconstrained usage.  Cherrypick from [ceff8955020cd13].

FossilOrigin-Name: 7227b61512a534645c73883c2e37b4e647592e5d
This commit is contained in:
drh
2013-05-08 14:20:28 +00:00
parent e8dee7d1ed
commit 8c15d99a9a
3 changed files with 16 additions and 9 deletions
+7 -1
View File
@@ -218,7 +218,13 @@ static int wholenumberBestIndex(
){
pIdxInfo->orderByConsumed = 1;
}
pIdxInfo->estimatedCost = (double)1;
if( (idxNum & 12)==0 ){
pIdxInfo->estimatedCost = (double)100000000;
}else if( (idxNum & 3)==0 ){
pIdxInfo->estimatedCost = (double)5;
}else{
pIdxInfo->estimatedCost = (double)1;
}
return SQLITE_OK;
}