Skip to content

Commit

Permalink
Performance improvement for sorted merge iterator
Browse files Browse the repository at this point in the history
Sorted merge iterator has cpu-intensive operations to sort the points
from multiple inputs. Typical queries like `SELECT * FROM m GROUP BY *`
do not behave well due to the comparison of points though in many cases
it doesn't necessarily have to use the slow path.

This patch adds a shortcut.  If each input has a single and unique
series we can just return the points input by input.
The detection of the shortcut introduces slight overhead but the gains
are significant in many slow queries.
  • Loading branch information
Tristan Su authored and foobar committed Apr 3, 2020
1 parent c4c3555 commit b8c6606
Show file tree
Hide file tree
Showing 2 changed files with 404 additions and 1 deletion.
Loading

0 comments on commit b8c6606

Please sign in to comment.