[ 
https://issues.apache.org/jira/browse/CALCITE-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15527228#comment-15527228
 ] 

Julian Hyde commented on CALCITE-1389:
--------------------------------------

I haven't looked at your code yet but I am familiar with the paper. Did you 
consider implementing that paper by building on top of Calcite's lattice 
construct?

The problem with "free form" materialized views is that there tend to be a lot 
of them. The paper aims to solve that problem, and so do lattices. But lattices 
are better: they can gather statistics and recommend creating views that don't 
exist but would likely be useful.

Lattices are essentially the same as the SPJ views described in the paper, but 
of course today they need to be created by hand. (I would argue that for 
DW-style workloads, creating lattices by hand is a lot more practical than 
creating MVs by hand. This is not just about making the optimizer's life 
easier, but also about making the DBA's life easier. MVs are not easy to manage 
operationally.) By anyway, if people have created a lot of MVs by hand, my idea 
was to have an algorithm that created lattices automatically, and thereby 
reduce the cost of examining all of those MVs.

The main missing piece, as I see it, is an algorithm that, given a collection 
of MVs, creates an optimal set of lattices such that each MV belongs to a 
lattice.

> Add rule to perform rewriting of queries using materialized views with joins
> ----------------------------------------------------------------------------
>
>                 Key: CALCITE-1389
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1389
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Michael Mior
>            Assignee: Michael Mior
>
>  I've been looking into implementing the approach from the following paper. 
> It's very nicely written and easy to follow. It also doesn't require trying 
> different join permutations. I'm starting with several additional 
> restrictions (only equijoins, no aggregations, etc.)
> ftp://ftp.cse.buffalo.edu/users/azhang/disc/SIGMOD/pdf-files/331/202-optimizing.pdf
> Thanks to [~jcamachorodriguez] for his help in sorting out some issues with 
> the rule so far.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to