Indexing Foreign Keys - should SQL Server do that automatically?
I’ve been doing another performance tuning job today and it highlighted to me once again that problem that a lack of indexes on foreign key columns can bring.
By adding indexes on the foreign keys on three tables, we saw a reduction of 87% in total I/O load on the server. There are other aspects of the system that I’m now working on but it really struck me that having SQL Server do this by default would avoid a lot of apparent performance problems. It would have to be one of the most common indexing issues that I see in my work.
What do you think? Should SQL Server simply do this by default when you declare a foreign key reference?
2008-07-28