To improve the query performance,1. Make sure that every table in your database has a primary key.
This will ensure that every table has a clustered index created (and hence, the corresponding pages of the table are physically sorted in the disk according to the primary key field). So, any data retrieval operation from the table using the primary key, or any sorting operation on the primary key field or any range of primary key values specified in the where clause will retrieve data from the table very fast.2. Create non-clustered indexes on columns which are:
* Frequently used in the search criteria
* Used to join other tables
* Used as foreign key fields
* Used in the ORDER BY clause
Ex: CREATE NON CLUSTERED INDEX NCLIX_OrderDetails_ProductID ON dbo.OrderDetails(ProductID) 3. Rewrite Queries to improve performance.
Refer 'Some TSQL Best Practices' section in the below linkhttp://www.codeproject.com/Articles/35665/Top-steps-to-optimize-data-access-in-SQL-Serv Kasani007, if this helps please login to Mark As Answer. | Alert Moderator