244 IBM Cognos Dynamic Cubes
Gross Profit for Retailers Region and Products Product Line. Use of aggregates can
significantly improve performance of queries by providing data aggregated at levels higher
than the grain of the fact.
By using both in-memory aggregates and database aggregates, data warehouses of all sizes,
but especially medium, large, and extra large warehouses, can benefit from the greatly
decreased query times.
The expectation is that most data warehouses already have database aggregates in some
form: either pre-existing aggregates for use by other applications, or aggregates added by the
DBA to accelerate certain queries. The process to identify relevant and useful database
aggregates can be difficult and time-consuming. For warehouses that do not yet have
aggregates, or want to supplement existing database aggregates with in-memory and other
in-database aggregates, run the Aggregate Advisor to get recommendations. The DBA has
the flexibility to choose which of the recommended database aggregates to implement, but
can rely on output from the Aggregate Advisor that these aggregates are relevant. Also, after
the modeler incorporates the aggregate cube information into the model, Cognos Dynamic
Cubes can guarantee routing to these database aggregates.
The aggregate cache and the in-memory aggregates that it holds should be enabled, when
possible. In-memory aggregates are meant to be a turn-key aggregate management solution.
Recommendations that are provided by the Aggregate Advisor can be easily saved and
loaded the next time the cube starts.
Small data warehouses might be able to provide improved query performance with only
in-memory aggregates cache if the queries to the underlying database have sufficient
performance.
Improving overall query performance
The intent is to improve the overall query performance across queries in a normal workload
against Cognos Dynamic Cubes. Use of aggregates can improve performance for a large
majority of user queries. However, not all queries need to be covered by aggregates. There
might be some outlier queries that do not hit the aggregate cache or route to a database
aggregate, because either there is no aggregate that can satisfy this query or it is not run
often to justify having an aggregate to cover it.
In addition to the aggregate cache and database aggregate routing, the result set cache,
expression cache, data cache, query pushdown, and other features of Cognos Dynamic
Cubes also help to provide the fast query response times users expect.
For new cube deployments, where a known workload of queries might not be known, run the
Aggregate Advisor by using only its cube model-based analysis logic to get a set of
recommendations to start with and apply to the cube data source. Then, later, after a known
or a sample workload is determined and captured, run the Aggregate Advisor again. This
time, set it to consider workload information to get a new set of recommendations to use that
are more relevant to actual user queries.
Over time, if overall query performance becomes less than satisfactory, it might be because
the workload characteristics have since changed. Recapture the workload information and
rerun the Aggregate Advisor. See the 8.3.6, “Rerunning the Aggregate Advisor” on page 220
for more scenarios about when to rerun the Aggregate Advisor.