Skip to Main Content

SQL Developer

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!

How to understand execution plan and improve query performance

user12251389Aug 22 2017 — edited Sep 15 2017

I have below query which returns 90,000 records and its taking almost 10 minutes to run. I dont have indexes on any of the tables and i cannot provide index as i am running this query in PROD.

I am viewing the execution plan in sql developer but not understanding exactly which condition is taking too much time and how can i improve it.

Select * from ORDER_MART FOL where FOL.PARENT_PROD_SRCID

IN

(

select e.PARENT_PROD_SRCID

from SRC_GRP a

JOIN MAR_GRP b ON a.h_lpgrp_id = b.h_lpgrp_id

JOIN DATA_GRP e ON e.parent_prod_srcid = b.H_LOCPR_ID

WHERE a.CHILD_LOCPR_ID != 0

AND dt_id BETWEEN 20170101 AND 20170731

AND valid_order = 1

AND a.PROD_TP_CODE like 'C%'

)

AND FOL.PROD_SRCID = 0 and IS_CAPS = 1;

Below is my query execution plan:

Untitled.png

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2017
Added on Aug 22 2017
9 comments
1,145 views