Hacker News new | ask | show | jobs
by TheCycoONE 636 days ago
In some RDBMS a foreign key will automatically create an index: https://dev.mysql.com/doc/refman/8.4/en/create-table-foreign...

I think this falls under the read the documentation fully point.

Edit: It occurs to me you likely meant on the column itself rather than on the referenced column. I don't have an example that does that.

1 comments

Both columns needs the correct type of index. The best thing to do is to use a tool that scans for missing indexes.