[MCOL-902] Group_concat() performance and gettrace() elapsed time Created: 2017-08-31 Updated: 2020-08-25 Resolved: 2018-01-18 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | Documentation |
| Affects Version/s: | 1.0.11 |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Lee (Inactive) | Assignee: | Andrew Hutchings (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 2017-19, 2017-20, 2017-24 | ||||||||
| Description |
|
Build tested: 1.0.11-1 Query Stats: MaxMemPct-13; NumTempFiles-0; TempFileSpace-0B; ApproxPhyI/O-0; CacheI/O-1611421; BlocksTouched-1611421; PartitionBlocksEliminated-0; MsgBytesIn-12GB; MsgBytesOut-1MB; Mode-Distributed Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows From this it seems the elapsed time is 154seconds, yet fetching the data is taking 600 seconds, with intermittent low traffic on the network (we are on 10G), the server is showing ExeMGR at 100%. Gettrace reported elapsed time of 154 seconds, but the query actually took 600 seconds to finished. 1) Is gettrace() reporting the correct elapsed time? There is another ticket, Using a VM with 60gb memory, I did similar tests using a 1gb dbt3 database. select l_orderkey, group_concat(l_partkey) from t1 group by l_orderkey; 1500000 rows in set, 1 warning (3 min 56.94 sec) Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows -----------------------------------------------------------+
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- select l_orderkey, group_concat(l_partkey order by o_custkey separator '') as g from t1, t2 where l_orderkey = o_orderkey group by l_orderkey; 1500000 rows in set, 1 warning (4 min 13.48 sec) MariaDB [tpch1]> select calgettrace();
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MariaDB [tpch1]> select calgetstats();
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ MariaDB [tpch1]> select l_orderkey, group_concat(replace(replace(l_partkey,3,1),4,1) order by o_custkey separator '') as g from t1, t2 where l_orderkey = o_orderkey group by l_orderkey; 1500000 rows in set, 1 warning (5 min 15.17 sec) MariaDB [tpch1]> select calgettrace();
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MariaDB [tpch1]> select calgetstats();
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- With 2gb of dbt3 data. MariaDB [tpch1]> select l_orderkey, group_concat(replace(replace(l_partkey,3,1),4,1) order by o_custkey separator '') as g from t1, t2 where l_orderkey = o_orderkey group by l_orderkey; 1500000 rows in set, 1 warning (11 min 3.55 sec) MariaDB [tpch1]> select calgettrace();
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MariaDB [tpch1]> select calgetstats();
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Comments |
| Comment by David Thompson (Inactive) [ 2017-12-11 ] |
|
This is still not actionable at this point so removing from sprint and 1.0.12. |
| Comment by Andrew Hutchings (Inactive) [ 2018-01-18 ] |
|
This has been difficult to reproduce to the magnitude observed. We are pretty certain the time difference can be attributed to either: 1. Excessive execution time in mysqld. In theory this could be measured using MariaDB's performance metrics if the problem could be reproduced. Swapping could cause this or some kind of timeout. As a resolution for now I have modified the following document to add a note that the execution time inside mysqld is not recorded using these functions: https://mariadb.com/kb/en/library/analyzing-queries-in-columnstore/ If this is discovered again and is decided that it is not due to the three above we can reopen this ticket or create a new one. |