{"id":341,"date":"2018-10-16T10:23:55","date_gmt":"2018-10-16T00:23:55","guid":{"rendered":"http:\/\/www.mrmarkyoung.com\/oracle\/?p=341"},"modified":"2018-10-16T10:36:47","modified_gmt":"2018-10-16T00:36:47","slug":"how-to-calculate-db-time-for-a-week","status":"publish","type":"post","link":"http:\/\/www.mrmarkyoung.com\/oracle\/2018\/10\/16\/how-to-calculate-db-time-for-a-week\/","title":{"rendered":"How to calculate DB time for a week"},"content":{"rendered":"<p>DB Time is a period demonstrate measurement that is the entirety of Oracle process CPU utilization and non-inert hold up time. While advancing Oracle frameworks we regularly center around decreasing &#8220;time&#8221;, however ordinarily database work is additionally part of the condition.<\/p>\n<pre class=\"lang:default decode:true \" >     SELECT sum(Round(NVL((e.value - s.value),-1)\/60\/1000000,2))\/1440 ||' days' \"DB Time\"\r\nFROM   DBA_HIST_SYS_TIME_MODEL s,\r\n       DBA_HIST_SYS_TIME_MODEL e\r\nWHERE  s.snap_id = (select min(snap_id) from dba_hist_snapshot where trunc(begin_interval_time) &gt; sysdate-7) AND\r\n       e.snap_id = (select max(snap_id) from dba_hist_snapshot)  AND\r\n       e.dbid = s.dbid AND\r\n       e.instance_number = s.instance_number AND\r\n       s.stat_name = 'DB time' AND\r\n       e.stat_id = s.stat_id;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>DB Time is a period demonstrate measurement that is the entirety of Oracle process CPU utilization and non-inert hold up time. While advancing Oracle frameworks we regularly center around decreasing &#8220;time&#8221;, however ordinarily database work is additionally part of the condition. SELECT sum(Round(NVL((e.value &#8211; s.value),-1)\/60\/1000000,2))\/1440 ||&#8217; days&#8217; &#8220;DB Time&#8221; FROM DBA_HIST_SYS_TIME_MODEL s, DBA_HIST_SYS_TIME_MODEL e WHERE &#8230; <a title=\"How to calculate DB time for a week\" class=\"read-more\" href=\"http:\/\/www.mrmarkyoung.com\/oracle\/2018\/10\/16\/how-to-calculate-db-time-for-a-week\/\" aria-label=\"Read more about How to calculate DB time for a week\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-341","post","type-post","status-publish","format-standard","hentry","category-oracle-database"],"_links":{"self":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":3,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":343,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/341\/revisions\/343"}],"wp:attachment":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/tags?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}