add indexes on foreign keys.