Interview Questions

1. • Query Hintstell the optimizer to apply this hint throughout the execution of the entire query. • Join Hintstell the optimizer to use a particular join at a particular point in the query • Table Hintscontrol table scans and the use of a particular index for a tabl What is Parameter sniffing?

SQL Server compiles the stored procedures using (sniffing) the parameters send the first time the procedure is compiled and put it in plan cache. After that every time the procedure executed again, SQL Server retrieves the execution plan from the cache and uses it (unless there is a reason for recompilation). The potential problem arises when the first time the stored procedure is executed, the set of parameters generate an acceptable plan for that set of parameters but very bad for other more common sets of parameters.

By Hena Parveen 2 0
Is this helpful? Yes No

Submit an interview question

Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of w3Sniff.

Get Started

Comments

Leave a Comment


Check out more interview questions

Based on your skills

MS SQL Server

1659828 1720 23 859

Angular

42398 92 0 46

Wordpress

34278 72 1 36