V$sql V$sqlarea V$sqltext

Source: Internet
Author: User

Here is a note that is purely a deepening impression:

V$sql lists statistics on GKFX SQL areas without the GROUP by clause and contains one row for each child of the original SQL text entered. Statistics displayed in V$sql is normally updated at the end of query execution. However, for long running queries, they is updated every 5 seconds. This makes it easy-to-see the impact of a long running SQL statements while they is still in progress.

Obviously V$sql information comes from the shared memory area of the common SQL areas, that is, the relevant SQL information in the database restart, the database cache is brushed, or the relevant SQL information is kicked out of the cache, this SQL information can not be queried in the v$sql. Instead, V$sql records the information for each child cursor for each SQL.

V$sqlarea displays statistics on shared SQL areas and contains one row per SQL string. It provides statistics on SQL statements that is in memory, parsed, and ready for execution.

The same v$sqlarea is stored in the library cache, but this view does a statistical analysis by using SQL string, that is, the group by with the Sql_text text, and in this case the other information is counted as SUM (). The total number of SQL child cursors can be obtained by Version_count. So simply put: V$sqlarea is storing a summary of the same SQL statement in different version.

Version_count:number of cursors that is present in the cache under this parent

Excutions:total number of executions, totalled over all the child cursors

V$sqltext displays the text of SQL statements belonging to GKFX SQL cursors in the SGA.

V$sql and V$sqlarea store more performance data, but its sql_text is incomplete, if you want to get the full SQL will be used v$sqltext.

V$sql V$sqlarea V$sqltext

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.