How to properly index a many-many association table?
In a typical many-many arrangement like this... Movies Actors Movies_Actors ------ ------ ------------- movie_ID actor_ID FK_movie_ID title name FK_actor_ID ... how should the association table ( 'Movies_Actors' ) be indexed for optimal read speed? I usually see this done only with the composite primary key in the association table, like so: CREATE TABLE Movies_Actors ( FK_movie_ID INTEGER, FK_actor_ID INTEGER, PRIMARY KEY (FK_movie_ID, FK_actor_ID) ) However, this seems like the index will only be useful when searching for both movie_ID and actor_ID (although I'm not certain on whether a