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!

Analyze versus DBMS_STATS

pacoKASJun 30 2011 — edited Jul 1 2011
Hello:

I have a PL/SQL process very complexed that lasts a long time (more than 24 hours)...

In order to accelerate it I usually ANALYZE the tables involving the process every 6 hours...

I completely sure that when I ANALYZE all the tables doing

ANALYZE TABLE TABLE_NAME COMPUTE STATISTICS

the process goes MUCH FASTER than when I use

BEGIN
sys.DBMS_STATS.gather_table_stats
(
OWNNAME=> 'MYUSER',
tabname=> TABLE_NAME,
CASCADE=> TRUE
);
END;

What could be the cause?

Thanks for advanced.

PD

I speak about the speed of the process, NOT the speed of the ANALYZE/DBMS_STATS...

Edited by: pacoKAS on 30-jun-2011 6:11

Edited by: pacoKAS on 30-jun-2011 6:11

Edited by: pacoKAS on 30-jun-2011 6:13
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2011
Added on Jun 30 2011
8 comments
519 views