SQL Performance (MOSC)

MOSC Banner

Correct execution plan is not considered for a query

edited May 23, 2013 4:56AM in SQL Performance (MOSC) 10 commentsAnswered
Hello Guys,

We are on Oracle database 10.2.0.3.

I was facing an issue with one of queries wherein the query was taking a long time to execute. After analysis, we realized the query was stuck on scanning a job data table named PS_JOB.

I gathered the stats on the job data table using the following command:

exec DBMS_STATS.GATHER_TABLE_STATS('SYSADM', 'PS_JOB', estimate_percent =>100, cascade => TRUE)

There was no impact and the query again got stuck in processing.

I again built the stats using the following command:

exec DBMS_STATS.GATHER_TABLE_STATS('SYSADM', 'PS_JOB', estimate_percent =>100, method_opt => 'FOR ALL COLUMNS SIZE 1', cascade => TRUE)

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