Notes 2 Myself
to remember…
SQL Optimization techniques
Posted by on August 25, 2011
- Limit the number of column returned in query
- Create a primary key on the table
- Create a Index on the column in the where clause
- Limit the numer of rows by TOP
- When working with the Join have an Index on the column used in join
- If you are using multiple column in where or order by create compound index and pay attention to the order of the index
- When you are trying to get Unique values use ORDER BY instead of DISTINCT
Advertisement