How would you optimize a query that is performing a join across two massive tables containing player transaction history and game session logs?