Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: