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!

Execution plan generation takes long time in oracle when there are too many joins (many are outer joins)

User_K9223Oct 31 2023

We have a complex view, which joins 20-25 tables where 10-15 are outer joins.

As we observed, the response time of the query is bad always for the first time execution, and we understand that the time taken is to generate an execution plan.

First time execution takes 25 seconds.

2nd execution onwards, it takes only 1 or 2 Secs.

From this, we assume that the time taken for plan generation is more than 20 Secs.

Is there anyway to improve this ?

Note: We have stats updated for all tables involved.

Comments
Post Details
Added on Oct 31 2023
6 comments
1,340 views