[MDEV-9062] join pushdown to storage engines Created: 2015-11-02 Updated: 2023-11-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer, Plugins |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major |
| Reporter: | Sergei Golubchik | Assignee: | Igor Babaev |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | smart_engine | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
Make it possible for a storage engine to take any query fragment to be executed internally in the engine. In particular, it should be possible to push joins, GROUP BY, ORDER BY, WHERE, HAVING. Assorted thoughts:
|
| Comments |
| Comment by Igor Babaev [ 2018-06-22 ] | ||||||
|
Here's a suggested scheme of the implementation of this feature. Let Q be an n-way join query of tables such that some of tables belong to the engines that can execute join operations SELECT ... FROM t[0],...,t[n] WHERE P(t[0],...,t[n]).
In this query first we define a derived table dt[1] that joins tables from T[0]. Then we define the derived table dt[2] that joins dt[1] and tables from T[1]. The derived table dt[j+1] joins the derived table dt[j] with tables from T[j]. | ||||||
| Comment by Igor Babaev [ 2018-08-01 ] | ||||||
|
Another scheme just encapsulate tables from odd partitions into derived tables and pushes conditions
Here P(t[k][0],...,t[k][lk])) is the condition over t[k][0],...,t[k][lk] that can be extracted from P(t[0],...,t[n]). With this scheme we rather push into the engine SELECTs that specify derived tables. | ||||||
| Comment by Igor Babaev [ 2018-08-01 ] | ||||||
|
Let's call a derived table External Derived Table (EDT) if it is specified by a SELECT over tables belonging to the same external database engine capable to execute SQL operations. | ||||||
| Comment by Igor Babaev [ 2018-08-08 ] | ||||||
|
Some observations | ||||||
| Comment by Igor Babaev [ 2018-08-29 ] | ||||||
|
I spinned off |