Good practices Flashcards
Best pratices
- Avoid using Att and Analy views.
2. Avoid mixing CDS views CV.
Unfolding can damage Performance sometimes.
Certain time Query unfolding can impact performance.
Such cases we need to add Hint.
Semantics-> Properties->Advanced-> Hint.
For e.g Compilation time can be increased.
SQL Analyser
You can check if CV is unfolded , if col view is called that means it is not unfolded.
Not Unfolded
M_FEATURE_USAGE.
JOIN Cardinalities
- If tables are used , then we can use Propose .
2. Ensure Correct Ness.
Perquisite of Join Pruning
- No fields from the to be pruned table.
- Outer , Ref or text
- Join Cardanility is either :1 for to be pruned or only measures with aggregation or no measure at all.
Refrential Join allows Join prunning if
- No fields from the to be pruned table.
- Integrity is placed on not to be pruned.
- Cardanilty on to be pruned is :1
Filter Pushdown
Ignore multiple output for filer can be set to have filter pushdown.
Joins Recommendations
- Maintain cardinality of the Join.
- Left Outer N:1 or 1:1 and Right outer 1:N, 1:1
- Reduce number of Join fields .
- Avoid Joining on Calculated fields.
- Check Dynamic or Optimise Join can be used.
List of values
- faster.
- Consistent across views.
- Support for analytical priv.
Column Prunning.
Add only column that are required in the output.
Filtering and Column Calculations.
- Verify filters are push down.
2, Try to avoid filters on Calculated Columns.
Optimal Aggregations.
- Try to aggregate as early as possible.
- do not switch measures with attributes.
- For Star Join use Start join model only , so not mix with sequence of joins.
Cache
- Can be used for view where there is no Analytical Priv.
- Analytics privileges can be assigned on top most view in the stack.
- Cache can be done at the Column level , in the cachc add only those columns that are requried .
- Cache size can futher reduced with the help of filters.
- Retention period of cache in MIN,
- It is currently not possible to define the cache invalidation if data is chaneged.
Cache prequsites.
- enable cache.
- CV can be unfolded.( Explain plan in SQL Analyser).
- No Granulity tracking calculations.