8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

Follow @dyemanov suggestion

This commit is contained in:
Vlad Khorsun 2024-03-21 15:07:05 +02:00
parent f2b281d05b
commit 4469b6da6d

View File

@ -1130,11 +1130,11 @@ void Optimizer::compileRelation(StreamType stream)
bool updated = false;
for (const index_desc& idx : idxList)
{
if (idx.idx_selectivity == 0.0f)
if (idx.idx_selectivity <= 0.0f)
{
SelectivityList selectivity;
BTR_selectivity(tdbb, relation, idx.idx_id, selectivity);
if (selectivity[0] != 0.0f)
if (selectivity[0] > 0.0f)
updated = true;
}
}