Package mondrian.spi

Interface StatisticsProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getColumnCardinality​(Dialect dialect, javax.sql.DataSource dataSource, java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String column, Execution execution)
      Returns an estimate of the number of rows in a table.
      int getQueryCardinality​(Dialect dialect, javax.sql.DataSource dataSource, java.lang.String sql, Execution execution)
      Returns an estimate of the number of rows returned by a query.
      int getTableCardinality​(Dialect dialect, javax.sql.DataSource dataSource, java.lang.String catalog, java.lang.String schema, java.lang.String table, Execution execution)
      Returns an estimate of the number of rows in a table.
    • Method Detail

      • getTableCardinality

        int getTableCardinality​(Dialect dialect,
                                javax.sql.DataSource dataSource,
                                java.lang.String catalog,
                                java.lang.String schema,
                                java.lang.String table,
                                Execution execution)
        Returns an estimate of the number of rows in a table.
        Parameters:
        dialect - Dialect
        dataSource - Data source
        catalog - Catalog name
        schema - Schema name
        table - Table name
        execution - Execution
        Returns:
        Estimated number of rows in table, or -1 if there is no estimate
      • getQueryCardinality

        int getQueryCardinality​(Dialect dialect,
                                javax.sql.DataSource dataSource,
                                java.lang.String sql,
                                Execution execution)
        Returns an estimate of the number of rows returned by a query.
        Parameters:
        dialect - Dialect
        dataSource - Data source
        sql - Query, e.g. "select * from customers where age < 20"
        execution - Execution
        Returns:
        Estimated number of rows returned by query, or -1 if there is no estimate
      • getColumnCardinality

        int getColumnCardinality​(Dialect dialect,
                                 javax.sql.DataSource dataSource,
                                 java.lang.String catalog,
                                 java.lang.String schema,
                                 java.lang.String table,
                                 java.lang.String column,
                                 Execution execution)
        Returns an estimate of the number of rows in a table.
        Parameters:
        dialect - Dialect
        dataSource - Data source
        catalog - Catalog name
        schema - Schema name
        table - Table name
        column - Column name
        execution - Execution
        Returns:
        Estimated number of rows in table, or -1 if there is no estimate