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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Optimization of pl/sql

3128872Nov 26 2015 — edited Dec 3 2015

Hi All ,

This is my query it takes 30 second to process . I need to optimize it pls provide me some solution. I also heard about EXPLAIN PLAN what is that?

                          Select  unique api\_WEEKLY.country From api\_WEEKLY INNER JOIN USERPROFILE

                               ON api\_WEEKLY.REGION  = NVL(USERPROFILE.REGION,api\_WEEKLY.REGION)

                               AND api\_WEEKLY.Category = NVL(USERPROFILE.SECTOR,api\_WEEKLY.Category)

                               AND api\_WEEKLY.MRP\_DRP\_CONTROLLER  = NVL(USERPROFILE.MRP\_DRP\_CONTROLLER,api\_WEEKLY.MRP\_DRP\_CONTROLLER)

                               AND api\_WEEKLY.TDC\_VAL = NVL(USERPROFILE.TDC\_VAL,api\_WEEKLY.TDC\_VAL)

                               AND api\_WEEKLY.PLANT  = NVL(USERPROFILE.PLANT,api\_WEEKLY.PLANT)

                                AND api\_WEEKLY.MATERIAL = NVL(USERPROFILE.MATERIAL,api\_WEEKLY.MATERIAL)

                               AND api\_WEEKLY.SUBSECTOR  = NVL(USERPROFILE.SUBSECTOR,api\_WEEKLY.SUBSECTOR)

                               AND api\_WEEKLY.COUNTRY = NVL(USERPROFILE.COUNTRY,api\_WEEKLY.COUNTRY)

                               WHERE USERPROFILE.USER\_ID = 'sheikh.a' ;

and this is my User table

profile.PNG

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 31 2015
Added on Nov 26 2015
5 comments
1,300 views