What are the main advantages of indexing the tables on SQL Server 2008?
Please explain with examples (if possible)..
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Indexing provides a way to improve the performance of your data access queries. Suppose you have a table with different identifying columns. Putting an index on each column, or combinations of columns that are queried together will improve your response time.
Example: you have a User table with columns:
Put an index on LastName if you are querying on last name, such as:
Index could be:
Or, put an index on 2 columns if you are querying these columns together:
Index could be:
All else equal, your queries will be faster if you create the index. Be careful though, too many indices may actually decrease performance.