5 Replies Latest reply: Jan 24, 2014 2:22 PM by Alvaro RSS

locked table stats

8ed92cb1-7ecc-49fe-8d0c-b9df3f7c2f29 Newbie
Currently Being Moderated

Hi All,
We actually locked a table stats (TABLE1) with intention to prevent the nightly auto gather stats from picking up from stats gathering.
Understand that the nightly gather stats job kick start at 10pm daily (during wkday).

The below manual stats gathering will run about 4 hours.
If we trigger the below at 8.30pm, will the nightly gather stats (10pm) pick it up for stats gathering?
As the first sql will unlock the stats and lock it only after completion which is about 12.30am.

exec dbms_stats.unlock_table_stats('AC', 'TABLE1');
exec dbms_stats.gather_table_stats(ownname=>'ac',tabname=>'TABLE1',estimate_percent => 50,cascade=>true, method_opt => 'for all columns size 254');
exec dbms_stats.lock_table_stats('AC', TABLE1);

 

thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points