Sql-server – How much do foreign keys affect performance

foreign keyperformancesql-server-2008-r2

I'm reviewing an SQL Server 2008R2 installation having large performance problems. Currently I'm looking into its indexes and foreign keys and have found out that none of the tables have any foreign keys specified. Either the application takes care of all the business logic by itself, or the installation is wrong.

How much do foreign keys affect performance? Or do they exist only for business logic? Are there any cases when not having foreign keys are an advantage? (e.g. this system supports SQL Server, Oracle and DB2.)

Best Answer

Foreign Keys are a referential integrity tool, not a performance tool.

Foreign Keys are not automatically indexed and if they are not indexed this can cause performance problems at least in SQL Server

For more detail follow MSDN Article Improving SQL Server Performance