firebird
firebird copied to clipboard
Improve the index scan to match multiple values at once [CORE4600]
Submitted by: @dyemanov
Votes: 1
The existing equality index scan deals with a single value and returns a bitmap matching that value. It could be extended to match several values with one index scan and return the combined bitmap for all those values. This allows to replace multiple index scans with a single scan in some cases. I can see such an improvement to be used e.g. by the block nested loops or the IN (<list>) predicate.
I suppose this should require the list of values to be sorted, but this is up to the implementation whether the storting will be performed by the caller or by the index scan code itself.
Modified by: @dyemanov
assignee: Vlad Khorsun [ hvlad ]
description: The existing equality index scan deals with a single value and returns a bitmap matching that value. It could be extended to match several values with one index scan and return the combined bitmap for all those values. This allows to replace multiple index scans with a single scan in some cases. I can see such an improvement to be used e.g. by the block nested loops or the IN (<list>) predicate. => The existing equality index scan deals with a single value and returns a bitmap matching that value. It could be extended to match several values with one index scan and return the combined bitmap for all those values. This allows to replace multiple index scans with a single scan in some cases. I can see such an improvement to be used e.g. by the block nested loops or the IN (<list>) predicate.
I suppose this should require the list of values to be sorted, but this is up to the implementation whether the storting will be performed by the caller or by the index scan code itself.
security: Developers [ 10012 ] =>
Implemented in Firebird 5.0, currently used by IN predicate only.