SQL Server Performance

Automatic creation of indexes on foreign keys

Discussion in 'SQL Server 2005 T-SQL Performance Tuning' started by EMoscosoCam, Apr 28, 2007.

  1. EMoscosoCam Member


    Every time a PK is declared on a table, a corresponding Index is created automatically. But every time a foreign key is declared, the corresponding Index has to be created manually. Since it is recomended that an index must exist for every FK on a table (unless I am wrong), why the index is not created automatically?

    I have other question: Strictly speaking, if one wants queries to run fast, are Keys of any use? I mean, is it only required to create appropiate indexes on a table when optimum performance of queries are the objective?

    Thanks a lot.
  2. MohammedU New Member

  3. alzdba Member

    - also there's more to a table, than just having persistent data !
    - a db also has metadata ! At least as important as the data itself, especialy in the beginning of a data-project or at mergery/adaption time.

Share This Page