[MDEV-4517] Upper query conditions push down to (aggregated) VIEWs Created: 2013-05-13 Updated: 2021-12-28 Resolved: 2021-12-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Oleksandr Byelkin | Assignee: | Oleksandr Byelkin |
| Resolution: | Duplicate | Votes: | 4 |
| Labels: | optimizer | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Now above query first materialize whole view an then start joining, when the size of materialized table could be reduced by pushing conditions related to the view it its HAVING clause. Problems: Implementation: |
| Comments |
| Comment by Sergei Petrunia [ 2021-12-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
A testcase:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2021-12-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
EXPLAIN that I get on 10.8:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2021-12-22 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Closing as duplicate of |