make order by more scalable / faster
(MCOL-894)
|
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.2.6 |
| Type: | Sub-Task | Priority: | Major |
| Reporter: | Andrew Hutchings (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Sprint: | 2019-06 |
| Description |
|
This ticket is to track multi-threaded order-by added into 1.2. This is for use cases where ColumnStore is executing the order by, such as subqueries. |
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2019-10-31 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
drrtuy has implemented this in 1.2 and will port it to 1.4 which will be tracked in | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2019-11-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 1.2.6-1 [dlee@master centos7]$ cat gitversionInfo.txt I did not observe and performance change when changing infinidb_orderby_threads from 1 to 8. 1.2.5-1 [root@localhost ~]# mcsmysql tpch10 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [tpch10]> select l_orderkey from lineitem order by l_orderkey limit 10;
------------
------------ MariaDB [tpch10]> select l_orderkey, l_comment from lineitem order by l_comment limit 10;
-----------
----------- 1.2.6-1 infinidb_orderby_threads MariaDB [tpch10]> set infinidb_orderby_threads=1; MariaDB [tpch10]> select l_orderkey from lineitem order by l_orderkey limit 10;
------------
------------ MariaDB [tpch10]> select l_orderkey, l_comment from lineitem order by l_comment limit 10;
-----------
----------- MariaDB [tpch10]> set infinidb_orderby_threads=8; MariaDB [tpch10]> select l_orderkey from lineitem order by l_orderkey limit 10;
------------
------------ MariaDB [tpch10]> select l_orderkey, l_comment from lineitem order by l_comment limit 10;
-----------
----------- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2019-11-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It turned out the performance would realize when subquery is used. Modified test queries to run as subqueries and performance is virtually the same as 1.4.1-1. MariaDB [tpch10]> set infinidb_orderby_threads=1; MariaDB [tpch10]> select * from ( select l_orderkey from lineitem order by l_orderkey limit 10) a;
------------
------------ MariaDB [tpch10]> select * from (select l_orderkey, l_comment from lineitem order by l_comment limit 10) a;
-----------
----------- MariaDB [tpch10]> set infinidb_orderby_threads=8; MariaDB [tpch10]> select * from ( select l_orderkey from lineitem order by l_orderkey limit 10) a;
------------
------------ MariaDB [tpch10]> select * from (select l_orderkey, l_comment from lineitem order by l_comment limit 10) a;
-----------
----------- |