本文介紹了每個(gè)外鍵的索引?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
每個(gè)外鍵上的索引都會(huì)優(yōu)化查詢嗎??
Does Index on every Foreign Key makes queries optimized ??
推薦答案
通常將索引放在外鍵上被認(rèn)為是一種很好的做法.這是通過(guò) b/c 完成的,它有助于在將 FK 表鏈接到包含鍵定義的表時(shí)提高連接性能.
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.
這不會(huì)神奇地使您的整個(gè)查詢優(yōu)化,但它肯定有助于提高 FK 與其主鍵對(duì)應(yīng)部分之間的連接性能.
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.
這篇關(guān)于每個(gè)外鍵的索引?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!