SQL Server Performance Forum – Threads Archive
Automatic creation of indexes on foreign keys
Hello 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.
Check the following…
SQL-Server-Performance.com All postings are provided â€œAS ISâ€ with no warranties for accuracy.
– 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.