[MCOL-4527] Simple query performace is degraded between 5.4 and 5.5 Created: 2021-02-02 Updated: 2021-02-20 Resolved: 2021-02-18 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | 5.5.1 |
| Fix Version/s: | 5.5.2 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Gregory Dorman (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Sub-Tasks: |
|
||||||||||||||||
| Sprint: | 2021-2, 2021-3 | ||||||||||||||||
| Description |
|
There appears to be a large loss of performance between 5.4 and 5.5 (close to 100%). In this reproduction, the table charset is set to lating1_bin, so 5 characters ZIP does participate in extent elimination in both versions. The 5.5 elapsed time, however, appears twice that of 5.4. CREATE TABLE `mailing_addresses_enriched` ( SELECT `AddressKey`, Server 1: Enterprise CS 5.5.1 Get Trace
Server 3: Enterprise CS 5.4.1 Get Trace
|
| Comments |
| Comment by Gregory Dorman (Inactive) [ 2021-02-02 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4522 is a larger problem - ever since we started to respect real byte count in utf8, a varchar(5) field no longer participates in extent elimination. However, even if this is work-arounded by using latin1, we are still seeing a large degradation of raw performance between 5.4 and 5.5. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-02-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can't repeat the problem reported here. RelWithDebInfo builds for 5.4 and 5.5 were used in the tests below. Preparation - make a dump file using a MyISAM table
ColumnStore tables in 5.4
Querying 5.4 tables
ColumnStore tables - 5.5
Querying 5.5 tables
Summary
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-02-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Note, every script like this:
was run multiple times (~20 times) and the best result was recorded in the statistics above. Note, exact timing jumped in a very wide range within a consequent run. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-02-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Note, the initial script reported in this MCOL (see above) has an error:
So an attempt to create the table returns an error:
The correct syntax is:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Gregory Dorman (Inactive) [ 2021-02-11 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Wait... <bar@mariadb.com | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2021-02-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
QA: There are two tests. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2021-02-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This fixes only this simple case. Further work will be done in MCOL-4534 for more general cases. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-02-18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.5.2-1 (Drone builds Drone engine=1678), 5.4.1 5.5.2 is a little faster than 5.4.1. Tests were done using VMs, with the only VM running on the test server. 5.4.1 drop table if exists lineitem; cpimport 10g lineitem twice, a total of 119972104 rows, or 16 extends [centos8:root~]# /usr/bin/colxml mytest -t lineitem -b4|grep l_orderkey [centos8:root~]# /usr/bin/editem -o 3038 MariaDB [mytest]> select calsettrace(1);
----------------
---------------- MariaDB [mytest]> select count(l_orderkey) from lineitem where l_orderkey >= '12000000';
-------------------
------------------- MariaDB [mytest]> select calGetStats();
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MariaDB [mytest]> select calgettrace();
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 5.5.2 create table lineitem ( cpimport 10g lineitem twice, a total of 119972104 rows, or 16 extends [centos8:root~]# /usr/bin/colxml mytest -t lineitem -b4|grep l_orderkey [centos8:root~]# /usr/bin/editem -o 3058 MariaDB [mytest]> select calsettrace(1);
----------------
---------------- MariaDB [mytest]> select count(l_orderkey) from lineitem where l_orderkey >= '12000000';
-------------------
------------------- MariaDB [mytest]> select calGetStats();
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MariaDB [mytest]> select calgettrace();
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-02-18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.5.2-1 (Drone builds 1681) Ran the same test for 5.5.2 on 6.1.1 and got similar result. MariaDB [mytest]> select count(l_orderkey) from lineitem where l_orderkey >= '12000000';
-------------------
------------------- |