• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Working with SQL Server Views > Optimizing the Views That You Build

Optimizing the Views That You Build

The most important thing that you can do to improve the performance of your views is to design your indexes efficiently. The SQL Server query optimizer automatically selects the most efficient index for any query. It can select only from existing indexes. It is therefore necessary that you create all the indexes that your queries will need to execute. Here are the guidelines:

  • Create indexes for any fields used in the criteria of queries.

  • Create indexes for any fields that are included in the sorting or grouping of a query.

  • Create indexes for all columns used in joins.

  • Do not create indexes for columns that have very few unique values.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint