About the implementation plan explanation of recursive calls,db block gets and consistent gets parameters

Source: Internet
Author: User
Tags execution sql net query rollback sorts client oracle database
Perform
We often have to look at the execution plan of an SQL statement in our actual work, for example:

After Sqlplus uses the command set autotrace on, the execution plan appears as follows:

SELECT STATEMENT optimizer=all_rows (cost=985 card=1 bytes=26)

Statistics
----------------------------------------------------------
Recursive calls
0 db Block gets
1052 consistent gets
7168 Physical Reads
0 Redo Size
395 Bytes sent via sql*net to client
Bytes received via sql*net from client
2 sql*net roundtrips To/from Client
0 Sorts (memory)
0 Sorts (disk)
1 rows processed

What is the specific meaning of recursive calls,db block gets,consistent gets?

The specific explanations are as follows:

· 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 this tables, Oracle Database generates an internal SQL statement, which in turn generates a recur Sive call.
In short, recursive calls are basically SQL performed on behalf of your of SQL. So, if you are had to parse the query, for example, your might have had to run some other queries to get data dictionary inform ation. These would are recursive calls. Space management, security checks, calling Pl/sql from Sql-all incur recursive SQL calls.

· DB Block Gets. Number of times A is requested.


The 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 when the query existed. The current mode blocks are retrieved as they exist right now, not from a previous point in time.
During a SELECT, you might the "retrievals" due to reading the data dictionary to find the extent information F Or a table to does a full scan (because you need the ' right now ' information, not the consistent read). During a modification, you'll access the blocks in the??
(DB block Gets: The number of requested data blocks that can be satisfied in buffer)

· Consistent Gets. Number of times a consistent read is requested for block.
This are how many blocks your processed in "consistent read" mode. This would include counts of blocks read from the rollback segment in order to roll back a block.
This is the "mode" you read blocks in and a SELECT, for example.
Also, when you did a searched update/delete, you read the blocks in consistent read mode and then get the mode to actually do the modification.
(Consistent Gets: Total number of data requests in the rollback segment buffer)

· Physical reads. Total number of data blocks read from disk. This number equals the value of ' physical reads direct ' plus all reads into the buffer cache. (Physical reads: Read the number of buffer cache blocks from disk after the instance is started)

· 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.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.