tibberous Posted July 30, 2008 Share Posted July 30, 2008 If I have a table with a many to one relationship, should I add an index to speed it up? ratings -> products And products have multiple ratings. And ratings have an `Owner` field. And what would the syntax be? create index `identifer` on ... ? Thanks Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted July 30, 2008 Share Posted July 30, 2008 Simple answer: yes If your are using joins on the products to ratings So your ratings table should have an index on productId // example ALTER TABLE ratings ADD INDEX (productId) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.