Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-428

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

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.1-incubating
    • None
    • None

    Description

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

      The standard algorithm is described in Implementing data cubes efficiently; Harinarayan, Rajaraman, Ullman 1996, and pentaho-aggdesigner implements it.

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

      {
        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: [ ]
        } ]
      }
      

      algorithm enables the optimization algorithm.

      rowCountEstimate specifies an estimate of the number of rows in the lattice. If not specified, 1000 is used.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: