We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82a7d46 commit 00c4ad4Copy full SHA for 00c4ad4
src/jrd/optimizer/Retrieval.cpp
@@ -715,7 +715,7 @@ void Retrieval::applyNavigation(InversionCandidate* candidate)
715
if (optimizer->favorFirstRows())
716
{
717
// Reset the cost to represent a single record retrieval
718
- navigationCost = DEFAULT_INDEX_COST;
+ navigationCost = navigationCandidate->matches.isEmpty() ? DEFAULT_INDEX_COST : 0;
719
720
// We know that some local filtering is applied, so we need
721
// to adjust the cost as we need to walk the index
0 commit comments