You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select *
from rdb$relations
where rdb$relation_id < 10
order by rdb$relation_id
PLAN (RDB$RELATIONS ORDER RDB$INDEX_1 INDEX (RDB$INDEX_1))
But it should be:
PLAN (RDB$RELATIONS ORDER RDB$INDEX_1)
Because the WHERE condition should just set the upper threshold key and thus limit the navigational scan. A prior regular index scan is completely redundant in this case.
Generally speaking, the same index should never appear in both ORDER and INDEX parts of the same plan item. This particular issue is a regression introduced in v2.0, however other aspects of this bug are visible in all FB versions.
Submitted by: @dyemanov
Is related to QA535
Votes: 1
Test case:
select *
from rdb$relations
where rdb$relation_id < 10
order by rdb$relation_id
PLAN (RDB$RELATIONS ORDER RDB$INDEX_1 INDEX (RDB$INDEX_1))
But it should be:
PLAN (RDB$RELATIONS ORDER RDB$INDEX_1)
Because the WHERE condition should just set the upper threshold key and thus limit the navigational scan. A prior regular index scan is completely redundant in this case.
Generally speaking, the same index should never appear in both ORDER and INDEX parts of the same plan item. This particular issue is a regression introduced in v2.0, however other aspects of this bug are visible in all FB versions.
Commits: 263b396 a5cde2b 74fbaf5 c65e55c FirebirdSQL/fbt-repository@ff96c7e FirebirdSQL/fbt-repository@920cc2b FirebirdSQL/fbt-repository@bbbf0b8 FirebirdSQL/fbt-repository@d4c51e1 FirebirdSQL/fbt-repository@b2d0198
The text was updated successfully, but these errors were encountered: