Add indexes to join tables