I'm trying to optimise and speed up a mysql 5.6 datatabase.
I have two tables with a many to many relationship:
Reservation and Resource. Each Reservation can have many Resources and each Resource can have many Reservations. I have a pivot table between the two tables which simply joins the two via their respective Id's
Should I be creating foreign keys within the pivot table for each of the ID's? Will this speed up queries or does this make little difference with a pivot table.
My initial thoughts are that I should but don't want to create a mess!