Skip to Main Content

Oracle Database Discussions

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!

Bad execution plan

3212662Jul 12 2016 — edited Jul 13 2016

Hello,

After using DBMS_REDEFINITON one one table i run a collection statistics for this table with:

BEGIN

dbms_stats.gather_table_stats ( ownname => 'EPK', tabname => 'AGD06', ESTIMATE_PERCENT => 100, cascade => true, degree => 8);

END;

/

I run an explain plan

Capture_THALER_01.PNG

On AGD06 table i have a full table scan.

I collect an other time the statistics on my table with the same sql and i run an other explain.

Capture-Thaler-02.PNG

This time my execution plan is good.

Why i must run tow times my statistics collection ?

I don't understand.

Thanks for your help

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2016
Added on Jul 12 2016
5 comments
1,019 views