Skip to Content
author's profile photo Former Member
Former Member

Do aggregates with 0 records give performance gain?

Hi experts, I am trying to improve performance in one of our cubes by building aggregates.

This cube contains only records with transaction types A and B. When I use RSRT and the debug option "Display Aggregate Found" I notice that several queries make one call on this cube with a static filter on transaction type Z, which will never exist in this cube.

My scope is not to change queries, so I have no intention of investigating why the queries make this call. What I would like to do is just to build aggregates to speed up the queries.

First I built an aggregate containing all the characteristics of the cube, but with a static filter on transaction type Z, meaning this aggregate always had 0 records. Whenever using these queries, this aggregate gets hit, so it seems to work as I wanted it to.

My question is if it actually gives any performance gain? Since transaction type Z does not even exist as a key in the cube's dimension table, maybe it would be more or less as fast to query the cube directly? I am not sure of how the query asks for information, but I guess that if it cannot find a key in the dimension table, it will never even have to search the fact table?

Thanks in advance for your help!

Martin

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Dec 14, 2011 at 07:21 AM

    Short answer: yes, it will improve the performance.

    By providing the aggregate that fits the filter condition and contains 0 entries, you effectively hand more information about the data to the data manager layer.

    It might even decide to not query the database at all, since it's clear a priori that there is no data in the aggregate.

    regards,

    Lars

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Vinod and Lars,

      thanks for your answers.

      I tried playing around with the query run-time statistics, but I think it would take me some time to analyze it properly this way.

      If the aggregate should give better performance from a logical point of view, that's really the thing I am after, then I know I'm building something that's worth while.

      Thanks

      Martin

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2011 at 02:37 PM

    Hi Martin,

    Not sure if the aggregate created improve the performance.

    But you can check the performance using report Aggregated Query Runtime Statistics: Analysis 0TCT_MC01_Q0200, if BI statistics is enabled. Compare performance by running the reoprt switching on and off the aggregates.

    Thanks,

    Vinod

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.