[MDEV-12792] limit queries with spider parallel / bgs_mode on generate unnecessary queries Created: 2017-05-12 Updated: 2023-05-23 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | David Thompson (Inactive) | Assignee: | Yuchen Pei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
centos 7 2 data nodes |
||
| Description |
|
using dbt3 or tpch data generator for data / schema. The following query performs faster with spider_bgs_mode 0 than higher values that enable parallel: enabling slow query log to log all queries on the backend, i observe that it is only sending the query to backend1 and not backend2 which is fine but when spider_bgs_mode > 0 it is actually sending 3 queries:
Changing spider_bgs_first_read to 10 reduces it to 2 queries:
In both cases there are unnecessary queries generated which are not needed. If you add an order by clause then only 1 query is sent with limit 10 to both nodes which is correct. This reproduces on 10.2-spider and the spiral arms forked code. |
| Comments |
| Comment by David Thompson (Inactive) [ 2017-05-12 ] | ||||||||||||||||||||||||||||||||||||||
|
backend schema:
Spider schema:
|