Optimizing Raw SQL Execution