Anda di halaman 1dari 6

Aggregate Awareness or @aggregate_aware is a term that we use to describe the ability of a universe to utilize aggregate tables in a database.

It improves performance and user experience. Aggregation means simply summarizing the data based on the requirement. Example: We have data for the entire year which is broken by each day. Date month Revenue 1500 2000 1000

1/1/2011 jan 2/1/2011 jan 3/1/2011 jan

for the above data we can create a monthly aggregation as shown below. month Revenue Jan 4500 --------------------------How to create aggregate awareness? before we add aggregate awareness in our universe we need to have aggregate tables or summary tables in the database level.these usually create based on a fact table or transaction table.How we summarize the data is according to the requirements. Examples of aggregate functions used are average,maximum,mean,minimum,mode Example for creating the aggregate table from a fact table. Suppose we have a fact table which consist of order information by date and contains a million records. Depending on the level of detail a report looks at, we can bypass looking at the huge fact table and get our results out of one of the two summary tables. Suppose we have to create a report which is showing the totals of sales cost,margin and quantity sold for each company ,city and state. So we can create a summary table in the database level with the query below.

The query for creating the company summary table. Select company,city,state,sum(sales cost),sum(margin),sum(quantity sold) from fact_table group by company,city,state. Less records equals quicker response time for your report and happy end users. How to make the aggregate awareness up and running in your universe. Step 1: First we have to add the aggregate tables or summary tables into your universe. Normally with Aggregate tables, you will not be linking them in to any of your other tables in the universe. They will just be hanging out by themselves on an island.This may give error while integrity check but it is expected.

Step 2: Set up aggregate awareness function in your objects.

The first thing is to determine which objects should get the AA function. The answer to this is that any object that is in both your summary tables and your fact tables. In my example, I will be adding AA to the following objects:
y y y y y y

Company City State Sales Cost Margin Quantity Sold

The syntax for aggregate aware function is @aggregate_aware([Field1], [Field2], ) when you populate the fields you want to use, you need to put the smallest / quickest responding table to the left while the biggest / slowest responding table will go to the right.

Company @Aggregate_Aware(Company Summary.Company,Fact Table.Company) Sales Cost @Aggregate_Aware(sum(Company Summary.Sales Cost),sum(Date Summary.Sales Cost),sum(Fact Table.Sales Cost))

Step3: set up your incompatible objects. An incompatible object is an object that will not work for a specific table. So really what you are doing is setting up objects that if selected will eliminate tables that you cannot use from your query. To access the incompatible objects, go to Tools > Aggregate Navigation.

In my example, I have set up incompatible objects for Company Summary as Year, Quarter, Month, Date, Order Date, Order Number and Customer Name. For my Date Summary table, I set up Order Date, Order Number, Customer Name, Company, City, State, and Margin. Once this is set up you should be able to export your universe and check out how it works in WebI. Query to test the performance Fact table query ----------------------

Company Summary table query

Date Summary table query

Anda mungkin juga menyukai