cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.06k stars 3.8k forks source link

colexec: add optimized variants of external sort #45192

Open yuzefovich opened 4 years ago

yuzefovich commented 4 years ago

When #44978 merges, we will have falling back to disk from all three variants of the in-memory sort operators. However, the general external sorter will be used in all cases, regardless of what the in-memory sorter is used. We could be more efficient and take advantage of either the limit and or the partial ordering in the external sorter as well.

Update: when #66303 merges, we will have the optimized variant for the top K case; however, the segmented sort ("sort chunks") optimization won't be added yet. There are some difficulties with making chunker spooler implement Resetter interface because sortChunksOp needs special resetting behavior for its own needs.

Jira issue: CRDB-5172

github-actions[bot] commented 1 year ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!