[MCOL-1205] support queries with circular INNER joins Created: 2018-02-06 Updated: 2023-03-06 Resolved: 2021-07-06 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | ExeMgr |
| Affects Version/s: | 1.0.12 |
| Fix Version/s: | 6.1.1 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | David Thompson (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 8 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Epic Link: | Tech debt | ||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2021-5, 2021-6, 2021-7, 2021-8, 2021-9 | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Certain types of query will result in the following error: This happens if a given table is joined more than once. This is a common pattern and can be generated by bi tools including microstrategy. dbt3 query 5 is one such example that should be supported:
|
| Comments |
| Comment by Dalu (Inactive) [ 2018-07-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
we are facing the same issue currently, is there an ETA for this feature? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dalu (Inactive) [ 2019-06-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
no update since over a year? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2019-06-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi DanielW, We have a PoC fix for this but it can make bad decisions on join order so we never merged it. A fix with a new optimizer for this would be a very large task and there hasn't been enough demand for us to work on a proper fix. In the mean time there is a workaround, for the example in the description add "+0" to the c_nationkey / s_nationkey join as follows:
This makes a separate virtual column internally allowing the join to work, but you may still need to manually order the joins if you find this does not perform well. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-04-29 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 5.6.1 ( Drone #2270) Tested dbt3 query #5 on a 10g (ten gb) database. It returned an error
I ran the 1gb qeury again on a 1gb (one gb) database and it took 436 seconds.
I also compared the 10g dbt3 performance of this build to release 5.5.2, using the modified query #5.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-07-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 6.1.1 ( #2727) With 32 gb memory and a 10gb dbt3 database, query #5 returned an error. ERROR 1815 (HY000): Internal error: IDB-2001: Join or subselect exceeds memory limit. The query worked if I used the analyze command before executing the query. Performance is about the same as the modified query #5. |