How are foreign key indexes helpful? What is the criteria for keeping a foreign key index?
How are foreign key indexes helpful
foreign keyindexoracle
foreign keyindexoracle
How are foreign key indexes helpful? What is the criteria for keeping a foreign key index?
Best Answer
This will be non-specific to oracle, but in general foreign key indexes are most useful because they speed up
JOIN
s.If you have a foreign key field, it is extremely likely you will use it as a
JOIN
key as well - that's the whole point of an FK, to make a direct association between one field intablea
to another field intableb
.Having this field indexed will speed up any queries that use that field in either the
WHERE
filter or in theJOIN
criteria.