Closed sim1984 closed 3 weeks ago
The fix wasn't fully correct, hence reopened.
For compound index (A, B) and condition A IS NULL AND B = <value>
the plan is now reported as Range Scan
while it should be Unique Scan
as before the fix:
SQL> select count(*) from rdb$procedures where rdb$package_name is null and rdb$procedure_name = 'ABC';
Select Expression
-> Aggregate
-> Filter
-> Table "RDB$PROCEDURES" Access By ID
-> Bitmap
-> Index "RDB$INDEX_21" Range Scan (full match)
Explain plan
Unique indexes can generally contain multiple
NULL
values, so "Unique scan" is only possible for pure equality (=) comparisons, but not forIS NULL
andIS NOT DISTINCT FROM
predicates. For such predicates, "Range Scan (full match)" is expected.