Noemi Pap-Takacs has uploaded a new patch set (#6). ( http://gerrit.cloudera.org:8080/18802 )
Change subject: IMPALA-11474: Codegen Tuple size in sorter-ir.cc ...................................................................... IMPALA-11474: Codegen Tuple size in sorter-ir.cc The number of bytes in a tuple is known before execution, it is available in the query plan. However, currently the tuple size is treated as a member variable of the TupleSorter. Using Codegen to replace this member variable by a constant in sorter-ir.cc can speed up the quicksort phase by up to 20% in the most simple queries with small tuples. Some examples using tpch_parquet lineitem, scale factor=8: disable_outermost_topn=1; Query: select _ from lineitem order by _ limit 1; +---------------+-------------------------+------+----------+----------+-------------+ | Order by | Tuple | NDV | Constant | Variable | Improvement | +---------------+-------------------------+------+----------+----------+-------------+ | rand() | int, rand | 48M | 12.21s | 14.21s | 14% | | l_linenumber | int | 7 | 1.81s | 2.34s | 22% | | l_orderkey | bigint | 12M | 5.38s | 6.69s | 19% | | l_receiptdate | string, decimal, bigint | 2600 | 17.3s | 18.7s | 7% | +---------------+-------------------------+------+----------+----------+-------------+ Change-Id: Ia4161a61db1782dc448dae9a1d4c1d120b055b3c --- M be/src/exec/partial-sort-node.cc M be/src/exec/sort-node.cc M be/src/exec/topn-node.cc M be/src/runtime/sorter-internal.h M be/src/runtime/sorter-ir.cc M be/src/runtime/sorter.cc 6 files changed, 20 insertions(+), 8 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/18802/6 -- To view, visit http://gerrit.cloudera.org:8080/18802 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia4161a61db1782dc448dae9a1d4c1d120b055b3c Gerrit-Change-Number: 18802 Gerrit-PatchSet: 6 Gerrit-Owner: Noemi Pap-Takacs <npaptak...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Noemi Pap-Takacs <npaptak...@cloudera.com>