Cube Logo0.33.23

Add a pre-aggregation

In this step, we'll add a pre-aggregation to optimize the performance of a specific query. Pre-aggregations are a caching technique that massively reduces query time from seconds to milliseconds. They are extremely useful for speeding up queries that are run frequently.

From the Developer Playground page, execute a query:

Cube Cloud Deployment Developer Playground Screen showing query results

Just above the results, click on Query was not accelerated with pre-aggregation to bring up the Rollup Designer:

Cube Cloud Deployment Developer Playground Screen showing Rollup Designer

The Rollup Designer will automatically suggest a pre-aggregation for the query; click Add to the Data Model and then retry the query in the Playground. This time, the query should be accelerated with a pre-aggregation.

It takes a bit of time to build a pre-aggregation, so the first run might not necessarily fast. Click Rerun query a few times until you see a subsecond query time.

Cube Cloud Deployment Developer Playground Screen querying a pre-aggregation

And with that, we conclude our Getting Started with Cube Cloud guide. If you'd like to learn more about Cube Cloud, check out this page.

Did you find this page useful?