sql - Do foreign keys have size? -


i calculating database size , had 1 doubt foreign keys. have size? if references, occupy 2 different positions in memory?

the columns make foreign key do, of course, have size, occupy same amount of space whether or not participating in foreign key relationship.

most database products require target column(s) of foreign key reference indexed - but, again, such index can exist in absence of foreign key relationship.

thirdly, foreign key require small (fixed) amount of metadata record existence.

beyond that, there may database products require additional space implement some foreign key features, such cascading deletes. such details product specific.

but in general, plain foreign keys, there should no additional storage requirement.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -