SQL Performance (MOSC)

MOSC Banner

Strange Really Slow SQL Appears To Be Coming From DBMS_AUT0_SQLTUNE

edited Jan 28, 2024 3:12PM in SQL Performance (MOSC) 1 commentAnswered

Hi All,

Our DBA noticed that there are a bunch of very slow queries running in production and we are trying to figure out where they are coming from. What is really strange is the query has a complex and very bad hint that is making the query use a really bad execution plan.

Here is the hint and part of the query.

When I checked gv$sql I noticed a column called PROGRAM_ID which points to the object id in dba_objects. To my surprise here is what I found:


It look like this query that is running in production for hours and hours is coming from the auto tune process. All three of these tables are very large with around 10m rows each.

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