Database Administration (MOSC)

MOSC Banner

How to gather stats on multiple tables at a time?

edited Sep 12, 2018 5:01AM in Database Administration (MOSC) 3 commentsAnswered

HI DBAs,

How do I gather stats for multiple tables at a time? I have got that the CONCURRENT Global parameter has to be set to TRUE for this, but didn't find the gather_table_stats syntax.

The job_queue_processes parameter is default value, ie 1000. Do I need to change that? What will be the repercussions of this?

Is this the proper way to do it?

BEGIN

  DBMS_STATS.SET_GLOBAL_PREFS ('CONCURRENT', 'TRUE');

  DBMS_STATS.GATHER_TABLE_STATS ('<owner>','<table1>','<table_2>','<table3>',DBMS_STATS.auto_sample_size, cascade => TRUE)

END;

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