Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Performance Issue or Slow Cursor?
Try changing the order of tables in FROM clause:
DECLARE
CURSOR c_search IS
SELECT PT.ID, PT.SET_TYPE, PT.LOCATION, PT.BACKUP, PT.ARCHIVE_ID FROM P_TYPES PT, TEMP_RESULT_TABLE TRT WHERE TRT.ID = PT.ID ORDER BY TRT.ID;
I think you are working with rule based optimizer. You don't have any conditions in your WHERE ( except join), so it starts from right to left and performs full table scan on your big table.
HTH. Michael. Received on Mon Sep 24 2001 - 05:58:26 CDT