Make AQSort a safe, observable performance knob for ORDER BY (post‑patent expiration)
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
As a TiDB user/DBA running large analytical queries, ORDER BY / TopN is a frequent latency and CPU hotspot. In TiDB, sort keys often share long common prefixes (e.g., encoded index/table keys, multi-column ORDER BY where early columns have low cardinality), so a common-prefix-aware sorting strategy can significantly reduce comparisons and improve cache locality.
TiDB has introduced an experimental AQSort path (inspired by US7680791B2 “sorting using common prefix bytes”). Since this patent has expired, this class of optimization can be used broadly and should be made production-friendly so users can benefit without legal or operational uncertainty.
Contributor guide
Assessment
This issue has not been assessed yet.