How would you optimize a slow-running query that joins a massive transaction table with a smaller user dimension table?