环境:AIX 5.2
数据库版本:10.2.0.2
在对数据库进行autotrace的时候,发现所有SQL的结果中statistics除了行数外都是0
fgos@FGOSDB>set autotrace traceonly statistics
fgos@FGOSDB>select leg from fgos.VIEW_LEG_TIMESTAMP where PLEG_AP_THR_ARR='DAX' or PLEG_AP_THR_ARR='KWE';
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
0 bytes sent via SQL*Net to client
0 bytes received via SQL*Net from client
0 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
16 rows processed
在网上查找,说可能是因为使用sys用户进行autotrace造成的,但是我使用的并非sys用户
最后尝试重建plan_table后问题解决
fgos@FGOSDB>@?/rdbms/admin/utlxplan.sql
create table PLAN_TABLE (
*
ERROR at line 1:
ORA-00955: name is already used by an existing object
fgos@FGOSDB>drop table plan_table;
Table dropped.
fgos@FGOSDB>@?/rdbms/admin/utlxplan.sql
Table created.
fgos@FGOSDB>select leg from fgos.VIEW_LEG_TIMESTAMP where PLEG_AP_THR_ARR='DAX' or PLEG_AP_THR_ARR='KWE';
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
20 consistent gets
0 physical reads
0 redo size
11162 bytes sent via SQL*Net to client
479 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
16 rows processed