While
generating the SQL query Microstrategy picks the best table for fetching the
data.
Now what is the meaning of the best table?
Microstrategy picks the table which has the less logical table size.Logical Size represents the aggregation level of the Table.
So how mstr calculates the logical size of the table?
Let say we have a hierarchy :
Supergroup -> Group -> Subgroup
1 2 3
Microstrategy assigns some weight to each attribute by using calculation :
(Position of the attribute in the hierarchy/Total attributes in the hierarchy)*10
So,
Supergroup : 1/3*10 = 3.33
Group : 2/3*10 = 6.66
Subgroup : 3/3*10 = 10
So if in a fact table(T1) we have Group ,Subgroup , Revenue then the Logical size of that table will be:Weight of Group+Weight of Subgroup = 6.66+10=16.66(rounded to 17)
This
Similarly , if in another fact table (T2) we have Supergroup ,Group , Revenue then the Logical size of that table will be :
Weight of Supergroup +Weight of Group = 3.33+6.66=9.99(rounded to 10)
Now we need a report with Attribute Group And Metric Revenue then which table mstr will pick as in both fact table T1 and T2 we have group and revenue.
Answer is : Logical Size
So MSTR will pick T2 while generating SQL as it has lesser Logical Size.
*Note : Logical Size of a table doesn't depend on Facts.
Now what is the meaning of the best table?
Microstrategy picks the table which has the less logical table size.Logical Size represents the aggregation level of the Table.
So how mstr calculates the logical size of the table?
Let say we have a hierarchy :
Supergroup -> Group -> Subgroup
1 2 3
Microstrategy assigns some weight to each attribute by using calculation :
(Position of the attribute in the hierarchy/Total attributes in the hierarchy)*10
So,
Supergroup : 1/3*10 = 3.33
Group : 2/3*10 = 6.66
Subgroup : 3/3*10 = 10
So if in a fact table(T1) we have Group ,Subgroup , Revenue then the Logical size of that table will be:Weight of Group+Weight of Subgroup = 6.66+10=16.66(rounded to 17)
This
Similarly , if in another fact table (T2) we have Supergroup ,Group , Revenue then the Logical size of that table will be :
Weight of Supergroup +Weight of Group = 3.33+6.66=9.99(rounded to 10)
Now we need a report with Attribute Group And Metric Revenue then which table mstr will pick as in both fact table T1 and T2 we have group and revenue.
Answer is : Logical Size
So MSTR will pick T2 while generating SQL as it has lesser Logical Size.
*Note : Logical Size of a table doesn't depend on Facts.
No comments:
Post a Comment