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!

Gather table stats in windows

2790985Apr 26 2015 — edited May 25 2015

Hi ,

Could you please help me to gather stats for below tables in Windows. I tried gathering using dbms_scheduler job for one table but it is not gathering stats for tables.

OWNER    TABLE_NAME   NUM_ROWS    BLOCKS   Size

MQRDW    DWREFERENCETRACE  2891985937    26372904  17.86 GB

TRAY    PON_SERIAL      563722072    5135734      8.12 GB

TRAY    PON_PSN          23588517  32009064  2.67 GB

TRAY    PON_BOM_LOG      37199475    212936      601 MB

TRAY    UNIQUE_ITEM_LOTS  6633907    79710      160  MB

TRAY    PON_BOM          5921377    41717   328 MB

SQL> begin

2  dbms_scheduler.create_job(

3  job_name => 'SCOTT_JOB_SCHEDULE',

4  job_type => 'EXECUTABLE',

5  job_action => 'begin dbms_stats.gather_table_stats(ownname =>"TRACE3",

6  tabname =>"PON_PSN",

7  estimate_percent =>30,

8  cascade=>true,

9  method_opt=>"FOR ALL COLUMNS SIZE 1",

10 degree => 5,

11 options => "GATHER STALE"); end;',

12 repeat_interval => 'freq=daily;byhour=04;byminute=0;bysecond=0;',

13 enabled => TRUE,

14 comments => 'customized stats gathering for risk engine');

15 end;

16 /

PL/SQL procedure successfully completed.


Total CPU count available on this server is  8

Oracle  -- 10.2.0.4.0

OS -- windows

  Regards,

Bala

This post has been answered by Geert Gruwez on May 25 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2015
Added on Apr 26 2015
24 comments
3,707 views