数据库

位置:IT落伍者 >> 数据库 >> 浏览文章

sql走索引,怎么始终有物理读?


发布日期:2018年02月23日
 
sql走索引,怎么始终有物理读?

问题是这样的

sql> r

select count(*)

from t_edu_member_info

* where status= and xs_zy=

执行计划

SELECT STATEMENT Optimizer=ALL_ROWS (Cost= Card= Bytes=)

SORT (AGGREGATE)

FILTER

INDEX (RANGE SCAN) OF IND_T_PREBM (NONUNIQUE) (Cost= Card= Bytes=)

统计信息

recursive calls

db block gets

consistent gets

physical reads

redo size

bytes sent via SQL*Net to client

bytes received via SQL*Net from client

SQL*Net roundtrips to/from client

sorts (memory)

sorts (disk)

rows processed

这个结果已经跑了几次但是 recursive calls 依然存在后来从事件产生的trace文件中到了线索用tkprof格式化trace文件后可以看到

select count(*)

from t_edu_member_info

where status=

and xs_zy=

call count cpu elapsed disk query current rows

Parse

Execute

Fetch

total

Misses in library cache during parse:

Optimizer mode: ALL_ROWS

Parsing user id:

Rows Row Source Operation

SORT AGGREGATE

FILTER

INDEX RANGE SCAN IND_T_PREBM (object id )

Elapsed times include waiting on following events:

Event waited on Times Max Wait Total Waited

Waited

direct path write

SQL*Net message to client

SQL*Net message from client

insert into sysfga_log$(sessionidtimestamp#dbuidosuidobj$schemaobj$name

policynamescnplholsqlbindoshstclientidextidlsqltext)

values

(:sysdate::::::::::::)

call count cpu elapsed disk query current rows

Parse

Execute

Fetch

total

Misses in library cache during parse:

Optimizer mode: CHOOSE

Parsing user id: SYS (recursive depth: )

Elapsed times include waiting on following events:

Event waited on Times Max Wait Total Waited

Waited

direct path read (lob)

原来是打开了审计功能

上一篇:Oracle9i在AIX上的性能调整--内存篇

下一篇:Oracle体系结构中的各种名称