Search before asking
Motivation
Negative predicates such as IS NOT NULL, !=, and NOT IN currently require reading all non-null BTree index files. This causes unnecessary index file reads when only a small number of files contain null values or the specified literals.
Solution
For BTree global indexes, evaluate negative predicates as a complement of the current row-id range. Exclude rows returned by IS NULL and the corresponding positive predicate (= or IN), while preserving SQL null semantics. Fall back to the existing behavior when the required positive predicates are unsupported.
Anything else?
No response
Are you willing to submit a PR?
Search before asking
Motivation
Negative predicates such as IS NOT NULL, !=, and NOT IN currently require reading all non-null BTree index files. This causes unnecessary index file reads when only a small number of files contain null values or the specified literals.
Solution
For BTree global indexes, evaluate negative predicates as a complement of the current row-id range. Exclude rows returned by IS NULL and the corresponding positive predicate (= or IN), while preserving SQL null semantics. Fall back to the existing behavior when the required positive predicates are unsupported.
Anything else?
No response
Are you willing to submit a PR?