Indexed the tables in the database