Database Administration (MOSC)

MOSC Banner

Query using wrong execution plan - Took long time to finish

Oracle Database 19c Enterprise Edition - Version 19.18

RAC database on Oracle Linux

We have a data load process that completes within 25 minutes but today it took 3 hours. I found out that, today it used a wrong / bad execution plan, therefore, it took lot longer.

BTW.. all stats are current for all tables and indexes. Also, we have not introduced any new indexes or data has not increased in size.

So, I have the following questions:

  1. how do I find the correct plan id or sql id that ran last week with 25 minutes completion?(sql query, etc.)
  2. After I found the above information, how should I remove this bad plan and pin a correct plan, so all subsequent data load runs using the correct execution plan?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center