Oracle query usage frequency and disk consumption require cache size

Source: Internet
Author: User

SELECT *   from(SELECTSql_text, sql_id, Cpu_time fromV$sqlORDER  byCpu_timeDESC) WHERERownum<= Ten ORDER  byRownumASC;SELECT *   from(SELECTSql_text, sql_id, Cpu_time fromV$sqlareaORDER  byCpu_timeDESC) WHERERownum<= Ten ORDERByrownumASC;

These 2 statements effect basically the same, one from the V$sql view query from the V$sqlarea view.

列出使用频率最高的5个查询:
SELECT sql_text, executions    from (SELECT  sql_text,               executions,               over (ORDERbyDESC  ) Exec_rank          fromWHERE<=5;

消耗磁盘读取最多的sql top5: 
SELECT disk_reads, Sql_text    from (SELECT  sql_text,               disk_reads,               over (ORDERbyDESC  ) Disk_reads_rank          fromWHERE<=5;

找出需要大量缓冲读取(逻辑读)操作的查询:
SELECT buffer_gets, Sql_text    from (SELECT  sql_text,               buffer_gets,               over (ORDERbyDESC  ) Buffer_gets_rank          fromWHERE<=5  ;

Oracle query usage frequency and disk consumption require cache size

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.