首页 > 代码库 > PLSQL_以前正常程式因统计信息过久突然出现性能问题(案例)

PLSQL_以前正常程式因统计信息过久突然出现性能问题(案例)

select sid, sql_id from v$session where sid = 1001

 

select b.BEGIN_INTERVAL_TIME, a.disk_reads_total, a.buffer_gets_total,a.BUFFER_GETS_DELTA, a.rows_processed_total, a.PLAN_HASH_VALUE  
from dba_hist_sqlstat a, dba_hist_snapshot b  
where a.SNAP_ID = b.SNAP_ID and sql_id = ‘466bpq7055f4c‘ order by 1 desc;  

select* from v$sql_plan

 

select name, last_analized from dba_tables

 

exec dbms_stats.gather_table_stats(ownname=>‘BOXV2‘,tabname=>‘FT_T_POSH‘,estimate_percent=>3,degree=>32,granularity=>‘GLOBAL‘,cascade=>FALSE,no_invalidate=>FALSE);

PLSQL_以前正常程式因统计信息过久突然出现性能问题(案例)