如题:
现在遇见这样一个问题,因为数据库表多,而且很多arc表,数据量很大。所以我做好策略每天抽样分析一些表,但是有些表在抽样1%分析的时候会报错,而抽样5%又不报错,当然这只是一种情况,还有抽样5%报错,而全表分析不报错。
全表分析肯定不可行的,因为表有上亿条记录。所以想了解下,oracle对于表分析是通过什么方式计算的,没找到有用的文档,如果哪位有有用的文档也可以共享下,谢谢!
现在遇见这样一个问题,因为数据库表多,而且很多arc表,数据量很大。所以我做好策略每天抽样分析一些表,但是有些表在抽样1%分析的时候会报错,而抽样5%又不报错,当然这只是一种情况,还有抽样5%报错,而全表分析不报错。
全表分析肯定不可行的,因为表有上亿条记录。所以想了解下,oracle对于表分析是通过什么方式计算的,没找到有用的文档,如果哪位有有用的文档也可以共享下,谢谢!
解决方案 »
- oracle package 中定义的变量,在其它函数中是否可以直接用?
- PFILE与SPFILE的区别
- 为什么总是链接不上去啊??
- ALTER SESSION SET PLSQL_CCFLAGS 这条命令是干什么用的啊
- ORA-00600: 内部错误代码, 参数: [qctcte1], [0], [], [], [], [], [], []
- oracle92 建立网络服务ORA-12514错误
- sqlldr控制文件如何去除字符串中两边的空格???
- 急,这样的SQL语句怎么写?我知道sqlserver但不知道oracle
- 我要散分了,1.sqlplus屏幕缓冲区数据被截断???? 2.login.sql文件无效
- 关于存储过程游标insert into子查询结果丢失的疑问
- 如何动态配置LDAP属性参数?
- 求助一条sql语句,某列有相同值,只取其一。
楼主是怎么分析的?analyze table tablename compute statistics for all indexes;是用这个语句吗?------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
Q Q 群:62697716
tabname => c.Tab_Name,
Estimate_Percent => 5,
Cascade => True);你说的那个现在已经很少用了吧?我是oracle10g
The ANALYZE statement can be used to gather statistics for a specific table, index or cluster. The statistics can be computed exactly, or estimated based on a specific number of rows, or a percentage of rows:DBMS_STATS
The DBMS_STATS package was introduced in Oracle 8i and is Oracles preferred method of gathering object statistics. Oracle list a number of benefits to using it including parallel execution, long term storage of statistics and transfer of statistics between servers. Once again, it follows a similar format to the other methods:设为1的时候报的是什么错的?------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
Q Q 群:62697716
我报错的情况是,报表里明明有的一个字段,分析的时候却报ORA-00904,碰到3个表,有2个表是报的主键,有一个表报的是很平常的字段,不是索引也不是主键。补充:这3张表都是一级分区表!
ORA-00904: string: invalid identifier
Cause: The column name entered is either missing or invalid.
Action: Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation s. It may not be a reserved word. 看看字段名先.. 还有其他的错误吗?------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
Q Q 群:62697716