You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2014/07/25 20:43:39 UTC
[jira] [Commented] (OPTIQ-344) Lattice data structure
[ https://issues.apache.org/jira/browse/OPTIQ-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14074754#comment-14074754 ]
Julian Hyde commented on OPTIQ-344:
-----------------------------------
Working on this in https://github.com/julianhyde/optiq/commits/optiq-344.
> Lattice data structure
> ----------------------
>
> Key: OPTIQ-344
> URL: https://issues.apache.org/jira/browse/OPTIQ-344
> Project: Optiq
> Issue Type: New Feature
> Reporter: Julian Hyde
> Assignee: Julian Hyde
>
> Add a "lattice" data structure, to organize, gather statistics on, and recommend materialized queries.
> DDL. Here is a possible SQL DDL syntax:
> CREATE LATTICE SalesStar AS
> SELECT *
> FROM SalesFact AS s
> JOIN TimeDim AS t USING (timeId)
> JOIN CustomerDim AS c USING (customerId)
> Structure. A materialized query would optionally belong to a lattice.
> Constraints. Creating a lattice implies that the first table is the fact table of a star schema, and all joins are many-to-one. That is, foreign keys, primary keys and NOT NULL constraints are implied.
> Statistics. When queries arrive that could use a lattice, a counter is incremented.
> Recommendation. An agent could recommend materialized queries to create based on static analysis of the star schema (e.g. table and column cardinalities), and perhaps statistics of past use.
> View matching. The optimizer uses a lattice to identify materialized queries that could satisfy a query. (Without a lattice, the such space would be much larger, because the optimizer would have to consider many join permutations.)
--
This message was sent by Atlassian JIRA
(v6.2#6252)