Thursday 15 March 2012

indexing - Does single index have benefits when selecting on several columns? SQL Server -


For example, there is a table with columns: Column A, Column B, Column C, Column D < P> and selects with many people there:

  column A, column B, column C column A, column C, column D column A, column B, column D   

target questions. But I do not want to create multi column indexes for all column combinations, because it can take a lot of space and slow down the system.

Is there just one index for column A? Will this improve the performance of the questions?

Thanks

One way to reduce the index "table scanning" Is used in the form. Any combination of columns or columns that you index should be used most often if it means to use 2 columns, then it is okay.

Also remember that a clustered index is a physical page of data. Not non-CLUSTERED. Therefore, a package index is going to be more efficient. You can always make the most used fields a compiled index and often can not place a non-clustered index on that area which is not often used.

In the end, it is all about data that I used to work with healthcare tables which were more than 1b records, indexing is very important in such an environment.

No comments:

Post a Comment