Fossil SCM
Adjust foci's xBestIndex() cost from 1 to 100 to address the performance regression report in [forum:2d15009e0e|forum post 2026-10-07T16:33:27Z]. A value of 10 performed equivalently to 1.
Commit
06ef844171929726ac8d7ca9bae43ad1d62856cf3129dadf5f621de995503ff3
Parent
9be336524c21f9b…
1 file changed
+3
-1
+3
-1
| --- src/foci.c | ||
| +++ src/foci.c | ||
| @@ -133,11 +133,13 @@ | ||
| 133 | 133 | if( pIdxInfo->aConstraint[i].iColumn==FOCI_CHECKINID ){ |
| 134 | 134 | pIdxInfo->idxNum = 1; |
| 135 | 135 | }else{ |
| 136 | 136 | pIdxInfo->idxNum = 2; |
| 137 | 137 | } |
| 138 | - pIdxInfo->estimatedCost = 1.0; | |
| 138 | + pIdxInfo->estimatedCost = 100.0 | |
| 139 | + /* values of 1 (historical) and 10 (tested) can make this | |
| 140 | + ** extremely slow. forum:2d15009e0e */ ; | |
| 139 | 141 | pIdxInfo->aConstraintUsage[i].argvIndex = 1; |
| 140 | 142 | pIdxInfo->aConstraintUsage[i].omit = 1; |
| 141 | 143 | break; |
| 142 | 144 | } |
| 143 | 145 | } |
| 144 | 146 |
| --- src/foci.c | |
| +++ src/foci.c | |
| @@ -133,11 +133,13 @@ | |
| 133 | if( pIdxInfo->aConstraint[i].iColumn==FOCI_CHECKINID ){ |
| 134 | pIdxInfo->idxNum = 1; |
| 135 | }else{ |
| 136 | pIdxInfo->idxNum = 2; |
| 137 | } |
| 138 | pIdxInfo->estimatedCost = 1.0; |
| 139 | pIdxInfo->aConstraintUsage[i].argvIndex = 1; |
| 140 | pIdxInfo->aConstraintUsage[i].omit = 1; |
| 141 | break; |
| 142 | } |
| 143 | } |
| 144 |
| --- src/foci.c | |
| +++ src/foci.c | |
| @@ -133,11 +133,13 @@ | |
| 133 | if( pIdxInfo->aConstraint[i].iColumn==FOCI_CHECKINID ){ |
| 134 | pIdxInfo->idxNum = 1; |
| 135 | }else{ |
| 136 | pIdxInfo->idxNum = 2; |
| 137 | } |
| 138 | pIdxInfo->estimatedCost = 100.0 |
| 139 | /* values of 1 (historical) and 10 (tested) can make this |
| 140 | ** extremely slow. forum:2d15009e0e */ ; |
| 141 | pIdxInfo->aConstraintUsage[i].argvIndex = 1; |
| 142 | pIdxInfo->aConstraintUsage[i].omit = 1; |
| 143 | break; |
| 144 | } |
| 145 | } |
| 146 |