本文介紹了每個外鍵的索引?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
每個外鍵上的索引都會優化查詢嗎??
Does Index on every Foreign Key makes queries optimized ??
推薦答案
通常將索引放在外鍵上被認為是一種很好的做法.這是通過 b/c 完成的,它有助于在將 FK 表鏈接到包含鍵定義的表時提高連接性能.
Typically it's considered good practice to place indexes on foreign keys. This is done b/c it helps with join performance when linking the FK table to the table that contains the definition of the key.
這不會神奇地使您的整個查詢優化,但它肯定有助于提高 FK 與其主鍵對應部分之間的連接性能.
This doesn't magically make your entire query optimized, but it will definitely help to improve the join performance between the FK and it's Primary Key counter-part.
這篇關于每個外鍵的索引?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!