How would you optimize a query that returns user transactions from a large database at Encore Capital Group?