最近做rman,发现耗时很长
具体查看后发现80%时间都浪费在了catalog Db的查询上
再看是一条sql语句的问题
查询该表,数据量也不大
不知为何要这么长时间
发现数据库是9I,又想起这个数据库基本没有人碰的
所以想是不是时间长未分析的原因
因为分析对于10G来说重要程度不大,但是对9I来说非常重要
所以对该表进行分析
select 'analyze table ×××.'||table_name||' compute statistics for table for all indexed columns for all indexes;' from dba_tables where owner='×××'
分析完毕后sql语句运转很快
rman备份也正常了