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/09/30 22:35:33 UTC

[jira] [Created] (OPTIQ-428) Use optimization algorithm to suggest which tiles of a lattice to materialize

Julian Hyde created OPTIQ-428:
---------------------------------

             Summary: Use optimization algorithm to suggest which tiles of a lattice to materialize
                 Key: OPTIQ-428
                 URL: https://issues.apache.org/jira/browse/OPTIQ-428
             Project: Optiq
          Issue Type: New Feature
            Reporter: Julian Hyde
            Assignee: Julian Hyde


Use an optimization algorithm to suggest which tiles of a lattice to materialize.

The standard algorithm is described in <a href="http://web.eecs.umich.edu/~jag/eecs584/papers/implementing_data_cube.pdf">Implementing data cubes efficiently [Harinarayan, Rajaraman, Ullman 1996]</a>, and pentaho-aggdesigner implements it.

Add 'algorithm' and 'rowCountEstimate' attributes to the lattice JSON element:

{code:javascript}
{
  name: 'star',
  algorithm: true,
  rowCountEstimate: 86000,
  sql: "select 1 from \"foodmart\".\"sales_fact_1997\" as \"s\"\njoin \"foodmart\".\"product\" as \"p\" using (\"product_id\")\njoin \"foodmart\".\"time_by_day\" as \"t\" using (\"time_id\")\njoin \"foodmart\".\"product_class\" as \"pc\" on \"p\".\"product_class_id\" = \"pc\".\"product_class_id\"",  auto: false,
  defaultMeasures: [ {
      agg: 'sum',
      args: 'unit_sales'
    }, {
      agg: 'sum',
      args: 'store_sales'
    }, {
      agg: 'count'
  } ],
  tiles: [ {
    dimensions: [ 'the_year', ['t', 'quarter'] ],
    measures: [ ]
  } ]
}
{code}

{{algorithm}} enables the optimization algorithm; {{rowCountEstimate}} specifies an estimate of the number of rows in the lattice.



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