Looking at DB tables created by a different developer I have noticed that whenever a table had a
forein_key_id field/column, it was always an
I am not sure if it was manually created, or automatically by some 3rd party software. However, I myself usually created keys using different principles. i.e. Just because it is a foreign key, I don't use that fact to also make it an
INDEX. I would typically look at JOIN considerations and JOIN performance individually for a particular query first.
So I am curious to find out more about this -- do foreign keys have to be made into an INDEX? If yes, what is the rationale behind it?