InterviewSolution
| 1. |
What is Aggregate awareness? How do you use this? |
|
Answer» Using aggregate awareness, you can use pre-aggregated data in tables in the database. It is used to improve query performance by processing less number of rows. When you add an aggregate aware object in query, query generator retrieves the data from table with highest aggregation level. Example − Consider a Sales Fact table where sales is aggregated by per month. If your query asks for sales per month, query generator will retrieve the data from aggregated table. How to set up Aggregate awareness? To use aggregate awareness, first the aggregated table has to be loaded to database and then add the table to Data Foundation. Define aggregate aware objects. These are objects in the business layer for which you want queries to use the aggregate tables when possible instead of performing aggregation using non-aggregate tables. In the SQL expression for the object, define the SELECT statement to use the Aggregate_Aware function − Aggregate_Aware(sum(aggr_table_1), …, sum(aggr_table_n)) |
|