70-516 · Question #8
70-516 Question #8: Real Exam Question with Answer & Explanation
The correct answer is A. EntityCommand. Whenever an attempt to execute a query is made, the query pipeline looks up its query plan cache to see whether the exact query is already compiled and available. If so, it reuses the cached plan rather than building a new one. If a match is not found in the query plan cache, the
Question
Options
- AEntityCommand
- BEntityConnection
- CEntityTransaction
- DEntityDataReader
Explanation
Whenever an attempt to execute a query is made, the query pipeline looks up its query plan cache to see whether the exact query is already compiled and available. If so, it reuses the cached plan rather than building a new one. If a match is not found in the query plan cache, the query is compiled and cached. A query is identified by its Entity SQL text and parameter collection (names and types). All text comparisons are case-sensitive. Query plan caching is configurable through the EntityCommand. To enable or disable query plan caching through System.Data.EntityClient.EntityCommand. EnablePlanCaching, set this property to true or false. Disabling plan caching for individual dynamic queries that are unlikely to be used more then once improves performance. You can enable query plan caching through EnablePlanCaching. Query Plan Caching
Community Discussion
No community discussion yet for this question.