Explain for the Statistics of Execution Plan

shiyihai發表於2007-06-08

SQL> set autotrace traceonly

SQL> select * from o_apache_log;

已選擇1280000行。

[@more@]

Execution Plan

----------------------------------------------------------

0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=8187 Card=1283425

Bytes=264385550)

1 0 TABLE ACCESS (FULL) OF 'O_APACHE_LOG' (TABLE) (Cost=8187 C

ard=1283425 Bytes=264385550)

Statistics

----------------------------------------------------------

1 recursive calls

0 db block gets

124337 consistent gets

26610 physical reads

0 redo size

224023149 bytes sent via SQL*Net to client

939159 bytes received via SQL*Net from client

85335 SQL*Net roundtrips to/from client

0 sorts (memory)

0 sorts (disk)

1280000 rows processed

SQL>

1 recursive calls

Number of recursive calls generated at both the user and system level.

Oracle Database maintains tables used for internal processing. When it needs to change these tables, Oracle Database generates an internal SQL statement, which in turn generates a recursive call.

In short, recursive calls are basically SQL performed on behalf of your SQL. So, if you had to parse the query, for example, you might have had to run some other queries to get data dictionary information. These would be recursive calls. Space management, security checks, calling PL/SQL from SQL—all incur recursive SQL calls.

2 db block gets

Current mode blocks are retrieved as they exist right now, not in a consistent read fashion.

Normally, blocks retrieved for a query are retrieved as they existed when the query began. Current mode blocks are retrieved as they exist right now, not from a previous point in time.

During a SELECT, you might see current mode retrievals due to reading the data dictionary to find the extent information for a table to do a full scan (because you need the "right now" information, not the consistent read). During a modification, you will Access the blocks in current mode in order to write to them.

3 consistent gets

Number of times a consistent read was requested for a block.

This is how many blocks you processed in "consistent read" mode. This will include counts of blocks read from the rollback segment in order to roll back a block.

This is the mode you read blocks in with a SELECT, for example.

Also, when you do a searched UPDATE/DELETE, you read the blocks in consistent read mode and then get the block in current mode to actually do the modification.

4 physical reads

Total number of data blocks read from disk. This number equals the value of "physical reads direct" plus all reads into buffer cache.

5 sorts (disk)

Number of sort operations that required at least one disk write. Sorts that require I/O to disk are quite resource intensive. Try increasing the size of the initialization parameter SORT_AREA_SIZE.

6 redo size

After DML and execute query next time,oracle need to delete the record of the transaction in the head of block,this will make log.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/38542/viewspace-918089/,如需轉載,請註明出處,否則將追究法律責任。

相關文章