SQL Server Index Storage – When to Store Nonclustered Indexes on Separate Filegroups

indexsql server

I have heard that storing indexes on a different filegroup and drive increases performance in a database because the drive doesn't have to go back and forth between the index and the data to which the index refers. I have also heard that this is a myth.

When is it advisable to store nonclustered indexes on a separate filegroup and drive? What perfmon/profiler evidence would lead me to arrive at that conclusion? Does hardware play a role in the decision (whether a RAID/SAN is used over a single drive)?

Best Answer

The slowest part of a DB system is the disk drives. Eliminating bottlenecks at the disk level will improve performance. When data is being looked up and an index is used, the index is first looked up and then the corresponding data is fetched. If both the index and data are on the same disks, then there is some contention happening. Whereas, if the data were on a different (physical) disk, then there is faster IO happening, thereby increasing performance. The main part to note is that the data or index are on separate physical disks or LUNs.

You would use such a scenario if you need to get better performance out of your system, provided you have the disks. For your perfmon counters you could use Physical Disk – Avg. Disk sec/Read, Physical Disk – Avg. Disk sec/Write, Physical Disk – Disk Reads/sec, Physical Disk – Disk Writes/sec to have a before and after comparison of your changes.