Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
MDEV-9197 adds support for pushdown of conditions into mergeable VIEWs (or derived tables).
Suppose the child query
- uses a window function
- the window function has a PARTITION BY col1 clause
Then, the condition on col1 can be pushed down through the window function.
Example:
select * from (
|
select
|
name,
|
rank() over (partition by dept
|
order by incidents desc) as R
|
from
|
staff
|
) as TBL
|
where dept='Support'
|
Here, current execution will compute incidents across all departments. However, we are only interested in dept='Support'. PARTITION BY dept allows pushing the dept='Support' condition to the inner query's WHERE condition.
Initial mention of this possible feature:
https://www.percona.com/live/data-performance-conference-2016/sessions/window-functions-mariadb , slide #66.
Attachments
Issue Links
- is duplicated by
-
MDEV-13385 Window Functions: Push condition into inner query
-
- Closed
-
- relates to
-
MDEV-6115 window functions as in the SQL standard
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Affects Version/s | 10.2 [ 14601 ] |
Affects Version/s | 10.2 [ 14601 ] | |
Issue Type | Bug [ 1 ] | Task [ 3 ] |
Assignee | Vicentiu Ciorbaru [ cvicentiu ] |
Link |
This issue is duplicated by |
Assignee | Vicentiu Ciorbaru [ cvicentiu ] | Igor Babaev [ igor ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Fix Version/s | 10.3.1 [ 22532 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 77162 ] | MariaDB v4 [ 132952 ] |