thinkinterview » interview questions » SQL Server
« Previous

SQL Server Interview Questions

next »
question

How do you optimize stored procedures in SQL Server 2005

Answer Description:

1.    Use as much as possible WHERE clause filters. Where Clause is the most important part for optimization
2.    Select only those fields which really require.
3.    Joins are expensive in terms of time. Make sure that use all the keys that relate the two tables together and don't join to unused tables, always try to join on indexed fields. The join type is important as well (INNER, OUTER).
 


Next Queston » In asp.net 2.0 what is the best way to handle sql connection stat...

In asp.net 2.0 what is the best way to handle sql connection state?View full queston »