In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
What is the difference between v$mystat, v$sesstat and v$sysstat? I believe many inexperienced people don't know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
The difference between v$mystat v$sesstat v$sysstat
My session stat current session Statistics-> mystat- > current session Statistics
Vsecretsesstats-> sesstat- > sessionstat are grouped by session
Vstatsysstats-> sysstat- > systemstat when the overall statistics of the system
V$statname
V$mystat refers to the stat of your own session.
V$sesstat is the stat of all session of the subsystem
In order to learn how to get the redo information generated by sql, you need to manipulate the view of vposts, mystatres, and vaststatname when you get the results from the query on the Internet:
1. Vaccounmystatrevaccounsesstat is used to count the session level and database statistics since the instance was started.
The structure of the two views is the same, but the statistics are not consistent.
Desc v$mystat
Is the name empty? Types
-
SID NUMBER
STATISTIC# NUMBER
VALUE NUMBER
SID represents the session number, corresponding to SID in v$session.
STATISTIC# represents statistical items
VALUE represents the value related to the statistical item
Only the session information of the current user will be found in the v$mystat view, and the v$sesstat will have all the session information within the entire instance. Therefore, the statistics of v&mystat are naturally included in v$sesstat.
SQL > desc v$sysstat
Name Null? Type
-
STATISTIC# NUMBER
NAME VARCHAR2 (64)
CLASS NUMBER
VALUE NUMBER
STAT_ID NUMBER
two。 In general, vaccounmystatjmsesstat is used in conjunction with v$statname.
UndefinedSQL > desc v$statname
Name Null? Type
-
STATISTIC# NUMBER
NAME VARCHAR2 (64)
CLASS NUMBER
STAT_ID NUMBER
The STATISTIC# in the v$statname view is associated with the STATISTIC# field in the vaccounsesstat. NAME is the corresponding English information, for example, to look up the redo information generated by a DML statement. You can write like this:
Select t.sid, t.value/1024/1024 size_m
From v$sesstat t, v$statname n
Where t.STATISTIC# = n.STATISTIC#
And name = 'redo size'
Order by 2
Select value
From v$mystat t, v$statname t1
Where t.STATISTIC# = t1.STATISTIC#
And t1.NAME = 'redo size'
The same is true for other information, just change the t1.name to the corresponding English name.
After reading the above, have you mastered the method of what is the difference between v$mystat, v$sesstat and v$sysstat? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.