How do you optimize a query that is running slowly on a massive dataset of credit card transactions for Navi?