How would you optimize a slow-performing SQL query that aggregates millions of historical insurance claims at Aetna?