Attempt to fix Oracle SQL performance