SAP_CAPintermediate
CQN and query performance
Compose filtered projections avoid N+1 and enforce pagination
Overview
Compose filtered projections avoid N+1 and enforce pagination
Lessons in this topic
- CQN and query performance — SAP Guided TutorialWriting efficient CAP queries with CQL/CQN: path expressions and nested projections instead of loops, server-side paging limits, and how to see the SQL CAP actually sends so you can fix N+1 problems.
Interview questions covered
- A Fiori list report on a CAP service is slow in production but fast in development. How do you investigate?
- How do nested projections in CQL help performance?
How to study CQN and query performance
CQN and query performance has 1 lesson (1 intermediate) with about 5 minutes of reading in total. Start with the lesson that matches your level, then read the real project scenario and common mistakes in each one before moving on. After the lessons, say the 2 interview questions out loud in your own words, then check yourself against the model answer in each question (shown once you open it). Use the 4 mock questions to check recall.
Mock test questions covered
Try answering each one before you open the mock test; the answer options and scoring are in the Mock Questions tab.
- A list request runs 501 SQL statements for 500 rows. What is the most likely cause?
- What is CQN in CAP?
- Which CAP feature protects the server from requests that try to return millions of rows?
- Why is `.where`title = ${input}`` safe from SQL injection in CAP?