{
  "date": "2015-05-18T06:16:03",
  "slug": "sql-monitor-report-little-improvement-in-12c",
  "link": "https://www.dbi-services.com/blog/sql-monitor-report-little-improvement-in-12c/",
  "title": {
    "rendered": "SQL Monitor report little improvement in 12c"
  },
  "content": {
    "rendered": "<h2>By Franck Pachot</h2>\n<p>.<br />\nThis is a very short post about something I though I had already blogged about.</p>\n<p>I like SQL Monitoring active reports. The are graphical, and still very light. There is only one thing I don&#8217;t like about it in 11g and it has been improved in 12c<br />\nLook at the following. The query has run for 1.1 minute. And from the &#8216;Database Time&#8217; line we can see that it used mostly CPU. If you&#8217;re not familiar with the color, just move the mouse above it and you will see the wait event and the number of samples.</p>\n<p><a class=\"easyblog-thumb-preview\" title=\"Capture001_20150415-204039_1.JPG\" href=\"http://dbi-services.com/blog/images/easyblog_images/139/Capture001_20150415-204039_1.JPG\"><img decoding=\"async\" title=\"b2ap3_thumbnail_Capture001_20150415-204039_1.JPG\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/b2ap3_thumbnail_Capture001_20150415-204039_1.jpg\" alt=\"b2ap3_thumbnail_Capture001_20150415-204039_1.JPG\" /></a></p>\n<p>Then I want to check which line in my execution plan is responsible for most of that time:</p>\n<p><a class=\"easyblog-thumb-preview\" title=\"Capture002_20150415-204038_1.JPG\" href=\"http://dbi-services.com/blog/images/easyblog_images/139/Capture002_20150415-204038_1.JPG\"><img decoding=\"async\" title=\"b2ap3_thumbnail_Capture002_20150415-204038_1.JPG\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/b2ap3_thumbnail_Capture002_20150415-204038_1.jpg\" alt=\"b2ap3_thumbnail_Capture002_20150415-204038_1.JPG\" /></a></p>\n<p>Look: there is no &#8216;Database Time column&#8217;. There is one for CPU and one for wait events. But that is not very helpful and misleading. Above, it looks like a large percentage of samples concerns wait events. But that&#8217;s only the percentage relative to wait events.<br />\nBecause I&#8217;ve seen before that most of the time is spent on CPU, I have to look at the CPU column only.</p>\n<h4>12c</h4>\n<p>This has changed in 12c. there is only one column called &#8216;Activity %&#8217; so the lines with a high percentage are those where the most of time is spend:</p>\n<p><a class=\"easyblog-thumb-preview\" title=\"Capture004.JPG\" href=\"http://dbi-services.com/blog/images/easyblog_images/139/Capture004.JPG\"><img decoding=\"async\" title=\"b2ap3_thumbnail_Capture004.JPG\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/b2ap3_thumbnail_Capture004.jpg\" alt=\"b2ap3_thumbnail_Capture004.JPG\" /></a></p>\n<p>Remember, this is sampling, not profiling. But if you apply the percentage to the total time, then you have a good estimation of the time spend on each part of the plan.<br />\n(the screenshot above has no sample about the I/O that occured, but the will show in the same column)</p>\n<p>This is very useful when you have a long query with a long execution plan.<br />\nOf course, this requires Tuning Pack. I&#8217;ll share in a future post how I approach that when having only Diagnostic Pack.</p>\n",
    "protected": false
  }
}
