Package mondrian.spi

Interface StatisticsProvider

    • Method Detail

      • getTableCardinality

        long getTableCardinality​(Dialect dialect,
                                 DataSource dataSource,
                                 String catalog,
                                 String schema,
                                 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

        long getQueryCardinality​(Dialect dialect,
                                 DataSource dataSource,
                                 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

        long getColumnCardinality​(Dialect dialect,
                                  DataSource dataSource,
                                  String catalog,
                                  String schema,
                                  String table,
                                  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