firebird icon indicating copy to clipboard operation
firebird copied to clipboard

Improve the index scan to match multiple values at once [CORE4600]

Open firebird-automations opened this issue 11 years ago • 1 comments

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.

firebird-automations avatar Nov 09 '14 15:11 firebird-automations

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 ] =>

firebird-automations avatar Nov 09 '14 15:11 firebird-automations

Implemented in Firebird 5.0, currently used by IN predicate only.

dyemanov avatar Sep 26 '23 11:09 dyemanov