View the redo log switching frequency of Oracle

Source: Internet
Author: User

View the redo log switching frequency of Oracle

The two SQL statements have the same principle, and the second uses the statistical function.
 
Time unit: minute

Method 1,
Select * from v $ log a where a. THREAD # = 1;
 
Set line 200
Select B. SEQUENCE #, B. FIRST_TIME,. SEQUENCE #,. FIRST_TIME, round (. FIRST_TIME-b.FIRST_TIME) * 24) * 60, 2) from v $ log_history a, v $ log_history B where. SEQUENCE # = B. SEQUENCE # + 1 and B. THREAD # = 1 order by. SEQUENCE # desc;

Method 2,
Set line 200
Select sequence #, first_time, nexttime, round (first_time-nexttime) * 24) * 60, 2) diff from (select sequence #, first_time, lag (first_time) over (order by sequence #) nexttime from v $ log_history where thread # = 1) order by sequence # desc;

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.