[英]Using dbms_stats.gather_schema_stats [oracle]
I am using dbms_stats.gather_schema_stats('%schema%')
我正在使用dbms_stats.gather_schema_stats('%schema%')
The process is working about 3 hours. 该过程大约需要3个小时。
Objective: to optimize the current process. 目的:优化当前流程。
Where do I see the time of collection of statistics? 我在哪里可以看到统计信息的收集时间?
The best thing to do is to trace the process that executes dbms_stats.gather_schema_stats and then profile the output. 最好的办法是跟踪执行dbms_stats.gather_schema_stats的进程,然后分析输出。 Then nobody has to guess. 然后没有人去猜测。
SQL> select * from v$diag_info /* to get location of trace file */;
SQL> exec dbms_monitor.session_trace_enable(null, null, true, false, 'all_executions')
SQL> exec dbms_stats.gather_schema_stats('%schema%')
SQL> exec dbms_monitor.session_trace_disable(null,null)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.