Oracle数据库统计信息收集
重新收集表统计信息
--重新收集表统计信息
BEGIN
DBMS_STATS.GATHER_TABLE_STATS(
OWNNAME => 'ORCL',
TABNAME => 'XXX',
ESTIMATE_PERCENT =>100,
DEGREE => 4
);
END;
重新收集列统计信息
-- 对某一列收集直方图
BEGIN
DBMS_STATS.GATHER_TABLE_STATS(
OWNNAME => 'ORCL',
TABNAME => 'XXX',
ESTIMATE_PERCENT => 100,
METHOD_OPT => 'FOR COLUMNS ENDDATE SIZE SKEWONLY',
DEGREE => DBMS_STATS.AUTO_DEGREE,
CASCADE => TRUE
);
END;
标签:DBMS,STATS,收集,DEGREE,数据库,信息,Oracle,统计
From: https://blog.csdn.net/weixin_44203221/article/details/140158832