[MCOL-3903] Performance regression in INSERT..SELECT Created: 2020-03-26 Updated: 2021-07-08 Resolved: 2021-07-08 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MDB Plugin |
| Affects Version/s: | 1.4.3 |
| Fix Version/s: | N/A, 1.4.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Roman | Assignee: | Roman |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Sprint: | 2020-5, 2020-6, 2020-7 | ||||||||||||||||||||||||
| Description |
|
*strong text*After integration, INSERT SELECT is no longer using "vtable" like method for executing SELECT part (does it via ROW interface). The fix is to push SELECT into Select Handler (a 1.4 replacement of vtable). As of 1.4.3 MCS uses table API to query the data running INSERT..SELECT. Mentioned ENT-669 backports 10.5 feature described by CLX-77 into 10.4 Ent. The feature enables Select Handler to execute the query part. 1.4 forces MCS to skip OFFSET processing b/c MDB applies OFFSET on its own. |
| Comments |
| Comment by Roman [ 2020-03-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4 QA: INSERT..SELECT part can be tested using working_tpch1/misc/insert_select.sql. The main expectation will be reduced execution time for INSERT..SELECT queries. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-03-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Plz review. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Gagan Goel (Inactive) [ 2020-03-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For QA: This is a performance improvement patch for insert...select queries, so it should not break any existing functionality. I would like to mention, the current working_tpch1/misc/insert_select.sql will be failing after this patch. This is however unrelated to this issue, and a separate ticket has been opened for it: https://jira.mariadb.org/browse/MCOL-3912 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-04-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There is a regression in expBetween.sql introduced by the original patch. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-04-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 1.4.3-5 hot fix, Azure 20200401.6 Execute regression test suite, insert_select.sql [root@localhost tests]# mysql tpch1 -vvv < /data/qa/shares/insert_select.sql Query OK, 0 rows affected, 1 warning (0.000 sec) -------------- Query OK, 0 rows affected, 1 warning (0.000 sec) -------------- Query OK, 0 rows affected (0.192 sec) -------------- Query OK, 0 rows affected (0.000 sec) -------------- Query OK, 1000 rows affected (0.740 sec) -------------- ----------
----------
---------- -------------- Query OK, 1004 rows affected (0.480 sec) -------------- ----------
----------
---------- -------------- Query OK, 100 rows affected, 100 warnings (0.303 sec) -------------- ----------
----------
---------- -------------- Query OK, 0 rows affected (0.897 sec) -------------- Query OK, 0 rows affected (0.005 sec) -------------- Query OK, 127 rows affected (0.180 sec) -------------- ----------
----------
---------- -------------- Query OK, 7 rows affected (0.356 sec) -------------- ----------
----------
---------- -------------- Query OK, 103 rows affected (0.299 sec) -------------- ----------
----------
---------- -------------- Query OK, 0 rows affected (0.019 sec) -------------- ----------
----------
---------- -------------- Query OK, 0 rows affected (0.399 sec) -------------- Query OK, 1000 rows affected (0.291 sec) -------------- Query OK, 105 rows affected (0.323 sec) -------------- ----------
----------
---------- -------------- Query OK, 0 rows affected (0.463 sec) Bye | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-04-08 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Plz review the PR for 1.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Gagan Goel (Inactive) [ 2020-04-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
For QA: The patch is also merged in current develop (1.5). Please ensure the same performance gains are also visible in 1.5. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-05-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 1.4.4-1, 1.5.0-1 source 1.4.4-1 /root/ColumnStore/buildColumnstoreFromGithubSource/server /root/ColumnStore/buildColumnstoreFromGithubSource/server/engine 1.5.0-1 /root/ColumnStore/buildColumnstoreFromGithubSource/server commit 6ad38ccc28d31a099d052e5de827543808843a3c 1.4.4-1 and 1.5.0-1 has about the same performance. Query OK, 0 rows affected, 1 warning (0.000 sec) -------------- Query OK, 0 rows affected, 1 warning (0.000 sec) -------------- Query OK, 0 rows affected (0.247 sec) -------------- Query OK, 0 rows affected (0.000 sec) -------------- Query OK, 1000 rows affected (1.454 sec) -------------- ----------
----------
---------- -------------- Query OK, 1004 rows affected (0.927 sec) -------------- ----------
----------
---------- -------------- Query OK, 100 rows affected, 100 warnings (0.631 sec) -------------- ----------
----------
---------- -------------- Query OK, 0 rows affected (1.698 sec) -------------- Query OK, 0 rows affected (0.011 sec) -------------- Query OK, 127 rows affected (0.438 sec) -------------- ----------
----------
---------- -------------- Query OK, 7 rows affected (2.006 sec) -------------- ----------
----------
---------- -------------- Query OK, 103 rows affected (1.066 sec) -------------- ----------
----------
---------- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-05-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Spent most of the day trying this from different angles can't reproduce though.
Here is the diff b/w 1.4.3-5 and current develop
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Roman [ 2020-05-04 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I need to confess I've seen almost the same 2x timings running insert_select.sql today and it magically disappears on its own so this must be a cloud. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-05-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I tested this a VM on my local server, the same way as I did other tests for this ticket. I made sure the test VM is he only VM exist on the host. |