Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Performance Issue or Slow Cursor?

Re: PL/SQL Performance Issue or Slow Cursor?

From: Michael Bialik <bialik_at_isdn.net.il>
Date: 24 Sep 2001 03:58:26 -0700
Message-ID: <969f8022.0109240258.7ccf7299@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US