Sql Query Optimization Tips and Tricks

Sql Query Optimization Tips and Tricks



  1. Try to use columns name inplace of * in the select statements.
  2. Try to create non-clustered indexes on table columns.
  3. Try to avoid function calls in the query.
  4. Try to create primary key on each table.
  5. Try to avoid COUNT() method in the query for checking esistance of record.
  6. Try to avoid as much as triggers count on the table.
  7. While doing sql join operations use only index columns.
  8. Try to avoid UNION, instead of that use UNION ALL
  9. Try to use Table Variables instead of tamporary tables in the procedrues, functions or triggers.
  10. Try to use Stored procedures instead of normal text queries.
  11. Try to avoid using cursors.
  12. Try to avoid having clause.
  13. Try to use where condition for narrowing the query search.
 This is one of the good SQL Server Interview Question
Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

 
Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar