{"id":148,"date":"2008-11-13T09:53:00","date_gmt":"2008-11-13T11:53:00","guid":{"rendered":"http:\/\/www.soudba.com.br\/?p=148"},"modified":"2008-11-13T09:53:00","modified_gmt":"2008-11-13T11:53:00","slug":"hit-da-instancia","status":"publish","type":"post","link":"https:\/\/www.soudba.com.br\/?p=148","title":{"rendered":"hit da instancia"},"content":{"rendered":"<p><span lang=\"PT-BR\">Atrav\u00e9s de um select simples podemos calcular todos os \u201cHit Ratios\u201d mais importantes de uma instance Oracle. Para simplificar o \u201cHit Ratio\u201d \u00e9 o percentual de acerto em uma certa \u00e1rea da SGA. Por exemplo, 95,3% \u00e9 o \u201cHit Ratios\u201d do Database buffer cache, isso significa que 95,3% dos blocos de dados  Oracle procurados est\u00e3o sendo encontrado em mem\u00f3ria.<\/span><\/p>\n<p><span lang=\"PT-BR\">O select :<\/span><\/p>\n<p><span lang=\"PT-BR\"><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">SELECT &#8216;Library Cache&#8217; Buffer , ROUND(100-SUM(reloads)\/SUM(pins) * 100,2) hit<\/span><br \/><span style=\"font-family:courier new;\">FROM   v$librarycache<\/span><br \/><span style=\"font-family:courier new;\">UNION ALL<\/span><br \/><span style=\"font-family:courier new;\">SELECT &#8216;Dictionary Cache&#8217;, 100 &#8211; ROUND((SUM(getmisses)\/SUM(gets))*100,2) hit<\/span><br \/><span style=\"font-family:courier new;\">FROM   v$rowcache<\/span><br \/><span style=\"font-family:courier new;\">UNION ALL<\/span><br \/><span style=\"font-family:courier new;\">SELECT &#8216;Buffer Cache&#8217;, ROUND((1 &#8211; (phy.value  \/ (cur.value + con.value)))*100,2) hit<\/span><br \/><span style=\"font-family:courier new;\">FROM   v$sysstat cur, v$sysstat con, v$sysstat phy<\/span><br \/><span style=\"font-family:courier new;\">WHERE  cur.NAME = &#8216;db block gets&#8217;<\/span><br \/><span style=\"font-family:courier new;\">AND    con.NAME = &#8216;consistent gets&#8217;<\/span><br \/><span style=\"font-family:courier new;\">AND    phy.NAME = &#8216;physical reads&#8217;<\/span><br \/><span style=\"font-family:courier new;\">UNION ALL<\/span><br \/><span style=\"font-family:courier new;\">SELECT &#8216;Redo Log Buffer&#8217;, ROUND((100-(r.value*100)\/e.value),2) hit<\/span><br \/><span style=\"font-family:courier new;\">FROM   v$sysstat r, v$sysstat e<\/span><br \/><span style=\"font-family:courier new;\">WHERE  r.NAME = &#8216;redo buffer allocation retries&#8217;<\/span><br \/><span style=\"font-family:courier new;\">AND    e.NAME = &#8216;redo entries&#8217;<\/span><br \/><span style=\"font-family:courier new;\">UNION ALL<\/span><br \/><span style=\"font-family:courier new;\">SELECT &#8216;Sort Area&#8217;, ROUND(((100*m.value)\/(d.value + m.value)),2) hit<\/span><br \/><span style=\"font-family:courier new;\">FROM   v$statname a, v$sysstat d, v$sysstat m<\/span><br \/><span style=\"font-family:courier new;\">WHERE  a.statistic# = d.statistic#<\/span><br \/><span style=\"font-family:courier new;\">AND    d.NAME = &#8216;sorts (disk)&#8217;<\/span><br \/><span style=\"font-family:courier new;\">AND    m.NAME = &#8216;sorts (memory)&#8217;<\/span><\/span><\/span><\/p>\n<p><span lang=\"PT-BR\"><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\"><\/span><\/span>O Resultado gerado no SQL*Plus:<\/span><\/p>\n<p><a href=\"http:\/\/photos1.blogger.com\/blogger\/7362\/3303\/1600\/resultado.jpg\"><img decoding=\"async\" style=\"cursor:pointer;\" src=\"http:\/\/photos1.blogger.com\/blogger\/7362\/3303\/400\/resultado.jpg\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p><\/p>\n<p>fonte: http:\/\/oraclemais.blogspot.com\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Atrav\u00e9s de um select simples podemos calcular todos os \u201cHit Ratios\u201d mais importantes de uma instance Oracle. Para simplificar o \u201cHit Ratio\u201d \u00e9 o percentual de acerto em uma certa \u00e1rea da SGA. Por exemplo, 95,3% \u00e9 o \u201cHit Ratios\u201d &hellip; <a href=\"https:\/\/www.soudba.com.br\/?p=148\">Continue lendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,133],"tags":[],"class_list":["post-148","post","type-post","status-publish","format-standard","hentry","category-acertos-na-instancia","category-instancia-hit"],"_links":{"self":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/posts\/148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=148"}],"version-history":[{"count":0,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=\/wp\/v2\/posts\/148\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.soudba.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}