Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query takes too much time in fetching last records.

SuriSep 19 2011 — edited Sep 19 2011
Hi,

I am using oracle 8.1 and trying to execute a SQL statement, it takes few minutes and display records.
When trying to fetch all the records, it is fast up to some level and takes much time to fetch last record.

Ex: If total records = 16336 , then it fetches records faster up to 16300 and takes app.500 sec to fetch last 36 records.

Could you kindly let me know the reason.

I have copied the explain plan below for your reference.Please let me know if anything is required.

SELECT STATEMENT, GOAL = RULE			4046	8	4048
 NESTED LOOPS OUTER			4046	8	4048
  NESTED LOOPS OUTER			4030	8	2952
   FILTER					
    NESTED LOOPS OUTER					
     NESTED LOOPS OUTER			4014	8	1728
      NESTED LOOPS			3998	8	936
       TABLE ACCESS BY INDEX ROWID	IFSAPP	CUSTOMER_ORDER_TAB	3966	8	440
        INDEX RANGE SCAN	IFSAPP	CUSTOMER_ORDER_1_IX	108	8	
       TABLE ACCESS BY INDEX ROWID	IFSAPP	CUSTOMER_ORDER_LINE_TAB	4	30667	1901354
        INDEX RANGE SCAN	IFSAPP	CUSTOMER_ORDER_LINE_PK	3	30667	
      TABLE ACCESS BY INDEX ROWID	IFSAPP	PWR_CONS_PARCEL_CONTENT_TAB	2	2000	198000
       INDEX RANGE SCAN	IFSAPP	PWR_CONS_PARCEL_CONTENT_1_IDX	1	2000	
     TABLE ACCESS BY INDEX ROWID	IFSAPP	PWR_CONS_PARCEL_TAB	1	2000	222000
      INDEX UNIQUE SCAN	IFSAPP	PWR_CONS_PARCEL_PK		2000	
   TABLE ACCESS BY INDEX ROWID	IFSAPP	CONSIGNMENT_PARCEL_TAB	1	2000	84000
    INDEX UNIQUE SCAN	IFSAPP	CONSIGNMENT_PARCEL_PK		2000	
  TABLE ACCESS BY INDEX ROWID	IFSAPP	PWR_OBJECT_CONNECTION_TAB	2	20	2740
   INDEX RANGE SCAN	IFSAPP	PWR_OBJECT_CONNECTION_IX1	1	20	
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 17 2011
Added on Sep 19 2011
6 comments
626 views