ORA-01422: exact fetch returns more than requested number of rows ORA-06512
2015-11-11 09:23
357 查看
1、环境
Oracle 10.2.0.5 RAC,AIX系统
2、Oracle统计信息收集,报错:
SQL> BEGIN dbms_stats.gather_table_stats(ownname =>'A_DTB1',tabname =>'TS_ADT_01',degree=>16,cascade => true,estimate_percen
t=>dbms_stats.auto_sample_size); END;
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "SYS.DBMS_STATS", line 15027
ORA-06512: at "SYS.DBMS_STATS", line 15049
ORA-06512: at line 1
3、解决办法
--加了GRANULARITY=>'ALL'
exec dbms_stats.gather_table_stats(ownname=>'A_DTB1', tabname=>'TS_ADT_01', degree=>16, cascade=>true,
estimate_percent=>dbms_stats.auto_sample_size, GRANULARITY=>'ALL');
4、学习
GRANULARITY 参数只适用于分区表:
'ALL' - gathers all (subpartition, partition, and global) statistics
'AUTO'- determines the granularity based on the partitioning type. This is the default value.
'DEFAULT' - gathers global and partition-level statistics. This option is obsolete, and while currently supported, it is included in the documentation for legacy reasons only. You should use the 'GLOBAL AND PARTITION' for this functionality. Note that the default value is now 'AUTO'.
'GLOBAL' - gathers global statistics
'GLOBAL AND PARTITION' - gathers the global and partition level statistics. No subpartition level statistics are gathered even if it is a composite partitioned object.
'PARTITION '- gathers partition-level statistics
'SUBPARTITION' - gathers subpartition-level statistics.
Oracle 10.2.0.5 RAC,AIX系统
2、Oracle统计信息收集,报错:
SQL> BEGIN dbms_stats.gather_table_stats(ownname =>'A_DTB1',tabname =>'TS_ADT_01',degree=>16,cascade => true,estimate_percen
t=>dbms_stats.auto_sample_size); END;
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "SYS.DBMS_STATS", line 15027
ORA-06512: at "SYS.DBMS_STATS", line 15049
ORA-06512: at line 1
3、解决办法
--加了GRANULARITY=>'ALL'
exec dbms_stats.gather_table_stats(ownname=>'A_DTB1', tabname=>'TS_ADT_01', degree=>16, cascade=>true,
estimate_percent=>dbms_stats.auto_sample_size, GRANULARITY=>'ALL');
4、学习
GRANULARITY 参数只适用于分区表:
'ALL' - gathers all (subpartition, partition, and global) statistics
'AUTO'- determines the granularity based on the partitioning type. This is the default value.
'DEFAULT' - gathers global and partition-level statistics. This option is obsolete, and while currently supported, it is included in the documentation for legacy reasons only. You should use the 'GLOBAL AND PARTITION' for this functionality. Note that the default value is now 'AUTO'.
'GLOBAL' - gathers global statistics
'GLOBAL AND PARTITION' - gathers the global and partition level statistics. No subpartition level statistics are gathered even if it is a composite partitioned object.
'PARTITION '- gathers partition-level statistics
'SUBPARTITION' - gathers subpartition-level statistics.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27126919/viewspace-1828145/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27126919/viewspace-1828145/
相关文章推荐
- 关于ORA-01422: exact fetch returns more than requested number of rows的问题
- ORA-01422: Exact Fetch Returns More than Requested Number of Rows
- SQL Error: ORA-01427: single-row subquery returns more than one row
- Data Structure Array: Given an array of of size n and a number k, find all elements that appear more than n/k times
- ORA-01427:single-row subquery returns more than one row
- Row index must be greater than or equal to zero and less than the number of rows.
- ORA-01427single-row subquery returns more than one
- Apache Tomcat哈希碰撞拒绝服务漏洞解决办法 or More than the maximum number of request parameters (GET plus POST)
- Number of actions are more than display limit 25.
- java.sql.SQLException: ORA-01427: single-row subquery returns more than one row
- JBWEB002004: More than the maximum number of request parameters (GET plus POST) for a single request
- Result consisted of more than one row
- ORA-00018:maximum number of sessions exceeded
- MoreThanHalfNumber
- 出现This version of the rendering library is more recent than your version of ADT plug-in. Please upda
- ORA-12514 TNS:listener does not currently know of service requested in connect descriptor
- ORA-01013: user requested cancel of current operation
- The number of points is less than required for feature
- Result consisted of more than one row
- Python: Number of rows affected by cursor.execute("SELECT …)