Lyra
Learn
AI Learning Platform
π Midnight
π Comfort
π₯ Ember
π Paper
β Contrast
Exams
Sign in to track progress
β Back to the lesson
Module 5 Β· Quiz
Performance and Troubleshooting
1. What is the first step to diagnosing slow performance with Entity Framework (EF)?
Read the generated SQL
Profile the application
Increase available server resources
Optimize the database schema
2. Which anti-pattern involves calling '.ToList()' before applying a filter in a query?
Materialize-then-filter
N+1 loops
Missing index
Non-sargable predicates
3. What is a common remedy for the N+1 query problem in EF?
Batch processing
Using raw SQL
Eager loading with Include
Creating a temporary table
4. In which scenario is it advisable to use raw SQL or stored procedures instead of EF?
For simple CRUD operations
When executing complex queries or bulk updates
When inserting single rows
For querying small datasets
Submit answers
Continue: Layers That Earn Their Keep β
Review this lesson
Retake quiz