Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

V$sql v$sqlarea v$sqltext

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Take a note here, just to make an impression:

V$SQL lists statistics on shared 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 are normally updated at the end of query execution. However, for long running queries, they are updated every 5 seconds. This makes it easy to see the impact of long running SQL statements while they are still in progress.

Obviously, the information of v$sql comes from the shared memory area shared SQL areas, that is, if the relevant SQL information is restarted in the database, the database cache is flushed, or the related SQL information is kicked out of the cache area, the information of this SQL cannot be queried in V$SQL. V$SQL records the information of each child cursor of each SQL.

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

Similarly, v$sqlarea is also stored in library cache, but this view makes a statistical analysis, which is grouped in sql string, that is, group by is done in sql_text text, and other information is counted in sum () on this premise. The total number of SQL subcursors can be obtained from version_count. So to put it simply: v$sqlarea stores a summary of the same SQL statement and different version.

Version_count:Number of child cursors that are 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 shared SQL cursors in the SGA.

V$sql and v$sqlarea store more performance data, but their sql_text is incomplete. If you want to get a complete sql, you need to use v$sqltext.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report