
Q1. What is the primary resource used when SQL Server compiles an execution plan?
- Marmite
- CPU
- Storage
- Memory
Q2. Which RECOMPILE hint didn’t register at all on the re-compilations/sec performance counter in our demo?
- The RECOMPILE query hint
- The undocumented DECOMPILE hint
- The RECOMPILE hint in the header of the procedure
Q3. When we used RECOMPILE as a query hint, what impact did this have on sys.dm_exec_query_stats?
- We didn’t see any information at all for that query
- We saw information about all 500 executions
- We only saw the information about one execution, the most recent
- It cleared the entire plan cache
Q4. When we used RECOMPILE as a query hint in a procedure, what impact did this have on sys.dm_exec_procedure_stats?
- We didn’t see any information at all for the procedure
- We saw information about all 500 executions
- We only saw the information about one execution, the most recent
- It cleared the entire plan cache
Q5. When we used RECOMPILE in the header of a procedure, what impact did this have on sys.dm_exec_query_stats and sys.dm_exec_procedure_stats?
- We saw information about all 500 executions
- We didn’t see any information at all for the procedure
- We only saw the information about one execution, the most recent
- It cleared the entire plan cache
Q6. What is one limitation of testing a procedure by running EXEC WITH RECOMPILE?
- If the procedure you’re running has a recompile hint in it, it does a double recompile backflip
- If you’re using nested code, this only applies to the outermost procedure
- It requires sysadmin permissions
- It won’t work if the procedure includes temp tables or table variables