Class AlgorithmImpl

java.lang.Object
org.pentaho.aggdes.algorithm.impl.AlgorithmImpl
All Implemented Interfaces:
Algorithm, Component
Direct Known Subclasses:
AdaptiveMonteCarloAlgorithm, ExhaustiveLatticeAlgorithm, MonteCarloAlgorithm

public abstract class AlgorithmImpl extends Object implements Algorithm
Implementation of the Algorithm that uses an exhaustive algorithm. The algorithm constructs the full lattice in memory, and uses a greedy algorithm which, at each step, chooses the aggregate which offers the greatest benefit over the current set of aggregates.

Cost

If there are N levels, then the lattice has size 2N. Let's suppose that the algorithm creates M aggregates before each aggregate sees only a marginal benefit. Then the running time is M * 2N.

The cost and memory usage of the algorithm is prohibitive for all but very small schemas. For example, for a schema with 20 levels and 40 aggregate tables, this requires memory for a lattice of 1 million potential aggregates, and 40 million steps to evaluate choose the actual set of aggregate tables.