Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Optimizer framework improvements #1421

Open
9 tasks
thepinetree opened this issue Dec 29, 2020 · 0 comments
Open
9 tasks

Optimizer framework improvements #1421

thepinetree opened this issue Dec 29, 2020 · 0 comments

Comments

@thepinetree
Copy link
Contributor

thepinetree commented Dec 29, 2020

Feature Request

Summary

Optimizer framework rewrite tasks to support better operator choices and property pushdowns, in particular related to ORDER BY, LIMIT, DESCENDING scans.

Solution

Optimizer Related Changes

Cost Model Related Changes

  • Add support for the cost model to choose the type of index scan based on the estimated cardinality of the scan itself (e.g. as observed by @tanujnay112, an Index Scan may match more predicate columns and create an open scan which runs more slowly compared to an Index Scan that matches fewer predicates but can perform an exact scan)
  • Add framework for optional properties in the optimizer to make the (future) cost model aware of these for better operator choice
  • Add support for operator tree pruning based on satisfied optional properties. ORDER BY nodes and LIMIT nodes are potential candidates

Index Related Changes

  • Support an index iterator that allows for predicate push down into the index, at which point, predicate filter nodes can be removed for index scans, and LIMITs can be used more robustly, as explained in comments in (Index Scan Limit #1031)
  • Exact scans should also be able to support LIMITs, but the ScanKey function doesn't expose this
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant