If I am selecting from a view which is non-indexed, and the view is selecting from an indexed table, will sql server use the index or do i have to index the view.
Share
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.
SQL Server will use the index if it decides that will help the query time. There is no need to create indexed views simply to get your table indexes to work within a view!
Rather, indexed views allow you to create indexes on derived (and non-derived) data, which can offer huge performance increases in some cases.