How would you optimize a slow-running PL/SQL query that is processing millions of records in a production environment at Mphasis?