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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user