SAP / SAP Mid Level (3 to 8 yrs) Interview questions
How do you troubleshoot performance issues in a CDS View?
Diagnosing a slow CDS View follows a similar approach to tuning any database query, using SAP-specific tools to see exactly what's happening at the database level.
- Check the SQL execution plan via transaction
ST05(SQL trace) or HANA's ownEXPLAIN PLAN, to see whether the underlying generated SQL is using indexes effectively or doing unnecessary full scans. - Look for unnecessarily "eager" associations being followed when they aren't actually needed by the consumer, forcing unneeded joins.
- Check for CDS Views stacked many layers deep — excessive nesting of composite/consumption views can sometimes generate a surprisingly complex final SQL statement that the database optimizer struggles with.
- Verify appropriate filtering happens as early as possible in the view chain, rather than filtering only at the very end after joining in unnecessary data.
Because CDS Views ultimately compile down to SQL, most standard SQL/HANA performance tuning knowledge (index usage, join order, selective filtering) applies directly, just approached through CDS-specific tooling and the view's declarative definition rather than hand-written SQL.
More Related questions...
