zoukankan      html  css  js  c++  java
  • oracle SQL性能分析

    1.查看消耗资源最多的 SQL:
    select hash_value, executions, buffer_gets, disk_reads, parse_calls
    from v$sqlarea
    where buffer_gets > 10000000 or disk_reads > 1000000
    order by buffer_gets + 100 * disk_reads desc ;
    2. 查看某条 SQL 语句的资源消耗:
    select hash_value, buffer_gets, disk_reads, executions, parse_calls
    from v$sqlarea
    where hash_value = 27762888 and address = hextoraw('cbndcdo6j');
    3.查找前10条性能差的sql语句
    select * from
    (select parsing_user_id,executions,sorts,command_type,disk_reads,sql_text from v$sqlarea order by disk_reads desc )
    where rownum<10 ;
    说明:
    EXECUTIONS表示同一条SQL语句一共执行了多少次,SORTS表示排序的次数,DISK_READS表示物理读的数量。

    不畏将来,不念过往,如此,安好。--vast desert
  • 相关阅读:
    UVA 12284 Digital Matrix
    lightoj 1052
    light oj 1236
    light oj 1151
    省选准备 MISTAKE 大全
    我的省选 Day -15
    「FJ2014集训」采药人的路径
    【NOI2012】迷失游乐园
    寒假这十天
    计算几何 大杂烩
  • 原文地址:https://www.cnblogs.com/damo-h/p/14143871.html
Copyright © 2011-2022 走看看