+ -
当前位置:首页 → 问答吧 → 关于ora1426解决办法的困惑

关于ora1426解决办法的困惑

时间:2011-09-12

来源:互联网

当truncate一个表的分区时会报ora 1426错,通常方法是将表drop重建 当表中数据量大而且很重要时就得用到表分析函数DBMS_STATS.GATHER_TABLE_STATS,而采样率【0.000001,100】越大就分析的越快,当分析完成后truncate表分区就可以实现。
想请教下为啥要用表分析来解决这个问题。

作者: 飞鱼ch   发布时间: 2011-09-12

> 当表中数据量大而且很重要时就得用到表分析函数DBMS_STATS.GATHER_TABLE_STATS

Where did you read that GATHER_TABLE_STATS is a way to resolve ORA-01426? And your Oracle version please.

If you're referring to
Bug 6837438: DBMS_STATS.GATHER_SCHEMA_STATS RETURNS AN ORA-01426
your understanding is not quite right. That bug is to resolve ORA-1426 while gathering stats.

Yong Huang

作者: Yong Huang   发布时间: 2011-09-13