[Oracle rich Shuai view series] Learn about v $ segment_statistics

Source: Internet
Author: User

[Oracle rich Shuai view series] I know v $ segment_statistics and send SR on MOS. Q: How is segment_statistics updated? Oracle's answer: v $ segment_statisitcs has been used for internal research since 9IR2 was introduced. [Answer: Sorry, I am confused.] (1) first look at the table structure: [plain] sys @ ORCL> desc v $ segment_statistics Name Null? Type authorization -------- ------------------------------------ OWNER VARCHAR2 (30) # object OWNER OBJECT_NAME VARCHAR2 (30) # Object Name SUBOBJECT_NAME VARCHAR2 (30) # subob_name VARCHAR2 (30) # TS # NUMBER # tablespace id obj # NUMBER # dictionary Object id dataobj # NUMBER # Data Object ID OBJECT_TYPE VARCHAR2 (18) # object type STATISTIC_NAME VARCHAR2 (64) # STATISTIC item name STATISTIC # NUMBER # STATISTIC item identification value number # STATISTIC item VALUE, unit: NUMBER of visits (ii) Next we will discuss applicable scenarios that can be used for monitoring segment-level (segment_level) statistical items and performance appraisal problems are caused by tables or indexes. Therefore, we can analyze whether some objects in the database are accessed too concentrated and wait too frequently. For example, for objects with high ITL waits, we can consider adding more transaction slots for it (3). Then, let's look at the example and use v $ segment_statistics to find the most frequently accessed table [plain] sys @ ORCL> ed Wrote file afiedt. buf 1 SELECT t. owner, t. table_name, lr. value + pr. value AS total_reads 2 FROM 3 (SELECT owner, object_name, value FROM v $ segment_statistics WHERE statistic_name = 'logical reads') lr, 4 (SELECT owner, object_name, value FROM v $ segment_statistics WHERE statistic_name = 'logical reads') pr, dba_tables t 5 WHERE lr. owner = pr. owner AND 6 lr. object_name = pr. object_name AND 7 lr. owner = t. owner AND 8 lr. object_name = t. table_name 9 * order by 3 desc sys @ ORCL>/OWNER TABLE_NAME TOTAL_READS limit ------------ sys wri $ _ limit 14080 sys wri $ _ limit 4736 SYSMAN MGMT_METRIC_COLLECTIONS 4000 SYS HIST_HEAD $3936 SYS COL_USAGE $3104 SYS FIXED_OBJ $2912 SYSMAN MGMT_SYSTEM_PERFORMANCE_LOG 2688

Related Article

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.