Optimize performance for `UnionScanExec` and `MemBuffer`
Open
sig/execution
sig/sql-infra
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
The UnionScan is not very efficient, for example:
- UnionScanExec will filter all rows/indexes in `Open` instead of `Next`. It will take more time when the SQL has a `LIMIT` because `Open` will not considerate it.
- Maybe we can implement`MemBuffer` more efficient.
The union scan's performance will affect the performance of temporary table, cached table and queries in a txn with a lot of uncommitted rows.
Contributor guide
Assessment
This issue has not been assessed yet.