Complete low-hanging fruit optimizations for sort_limit codepath

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • v9.0
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      After profiling `SortLimitVaryConstant`, I found a few easy improvements that can be done to speed up queries of this shape. First, rather than using `strlen`, use a bespoke SWAR method to speed up string length calculations. Then, inline some often-used functions in the hot path. SimpleMemoryUsageTracker::set() and SorterStats::memUsage() can be made inline.

            Assignee:
            Kyle Burgess
            Reporter:
            Kyle Burgess
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: