{"id":4943,"date":"2015-06-12T10:12:07","date_gmt":"2015-06-12T08:12:07","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/"},"modified":"2015-06-12T10:12:07","modified_gmt":"2015-06-12T08:12:07","slug":"flame-graph-for-quick-identification-of-oracle-bug","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/","title":{"rendered":"Flame Graph for quick identification of Oracle bug"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nMost of my performance stores start with a screenshot of <a href=\"http:\/\/orachrome.com\/en\/index.html\">Orachrome Lighty<\/a>\u00a0my preferred tool to have a graphical view of the database performance, in Standard and Enterprise Edition without any options:<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"CaptureHighParse.JPG\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/139\/CaptureHighParse.JPG\"><img decoding=\"async\" title=\"b2ap3_thumbnail_CaptureHighParse.JPG\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg\" alt=\"b2ap3_thumbnail_CaptureHighParse.JPG\" \/><\/a><\/p>\n<p>I&#8217;m investigating a long running query. That query obeys to the most important rule in Oracle performance: parce once (CPU) &#8211; execute many (IO+CPU) &#8230; except that the parse time is a bit too long here (2 hours)<\/p>\n<p>How to know what happens ? ASH is there if you have Diagnostic Pack:<\/p>\n<pre><code>\nMIN(SAMPLE_TIME)  MAX(SAMPLE_TIME)  COUNT(*) PLAN_LINE_ID SESSION_STATE IN_PARSE IN_SQL_EXECUTION\n----------------- -------------------------- ------------ ------------- -------- ----------------\n10.06.15 04:26:43 10.06.15 05:29:41     3773              ON CPU        Y        N\n10.06.15 05:21:26 10.06.15 06:37:43     4078              ON CPU        Y        Y\n10.06.15 06:37:44 10.06.15 10:14:54       34           26 WAITING       N        Y\n10.06.15 06:37:53 10.06.15 10:15:38      707           32 WAITING       N        Y\n10.06.15 06:38:49 10.06.15 10:15:46      106           33 WAITING       N        Y\n10.06.15 06:38:57 10.06.15 10:15:42       18           28 ON CPU        N        Y\n10.06.15 06:38:59 10.06.15 09:44:13        5           25 ON CPU        N        Y\n<\/code><\/pre>\n<p>and this is where I know that those 2 hours on CPU are for parsing. No SQL_PLAN_LINE_ID at parse phase. I&#8217;ve no explanation yet about the hour that is accounted both as parse and execution. Comments below are there for ideas \ud83d\ude09<\/p>\n<p>Ok, it&#8217;s in CPU. Then let&#8217;s go to flame graphs:<\/p>\n<pre><code>\nperf record -e cpu-cycles -o \/tmp\/perf.out -g -p 3708\n^C\n[ perf record: Woken up 1207 times to write data ]\n[ perf record: Captured and wrote 301.689 MB \/tmp\/perf.out (~13180986 samples) ]\nperf script -i \/tmp\/perf.out | .\/FlameGraph-master\/stackcollapse-perf.pl &gt; \/tmp\/perf.folded\n.\/FlameGraph-master\/flamegraph.pl \/tmp\/perf.folded &gt; \/tmp\/perf.folded.svg\ncp \/tmp\/perf.folded.svg .\n<\/code><\/pre>\n<p>Here is the .svg opened with a browser:<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"CaptureHighParseFlame.JPG\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/139\/CaptureHighParseFlame.JPG\"><img decoding=\"async\" title=\"b2ap3_thumbnail_CaptureHighParseFlame.JPG\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParseFlame.jpg\" alt=\"b2ap3_thumbnail_CaptureHighParseFlame.JPG\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>When the parsing time is in hours, we are obvously encountering a bug. So let&#8217;s search on MOS for: kghalf kghalp kokqopdup and bingo &#8211; several bugs about high CPU usage. Workaround is to disable Simple View Merging.<\/p>\n<p>I have a workaround now &#8211; disabling simple view merging. Parse time is short. But query is still running for one hour&#8230;<\/p>\n<p>This blog post was about using perf and flame graphs to get the stack from several samples, rather than taking few stack dumps. Those are great tools.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . Most of my performance stores start with a screenshot of Orachrome Lighty\u00a0my preferred tool to have a graphical view of the database performance, in Standard and Enterprise Edition without any options: I&#8217;m investigating a long running query. That query obeys to the most important rule in Oracle performance: parce once (CPU) [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":4944,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[198,59],"tags":[96],"type_dbi":[],"class_list":["post-4943","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-management","category-oracle","tag-oracle"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Flame Graph for quick identification of Oracle bug - dbi Blog<\/title>\n<meta name=\"description\" content=\"This blog post is about using perf and flame graphs to get the stack from several samples, rather than taking few stack dumps\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Flame Graph for quick identification of Oracle bug\" \/>\n<meta property=\"og:description\" content=\"This blog post is about using perf and flame graphs to get the stack from several samples, rather than taking few stack dumps\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-12T08:12:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"499\" \/>\n\t<meta property=\"og:image:height\" content=\"275\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Flame Graph for quick identification of Oracle bug\",\"datePublished\":\"2015-06-12T08:12:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/\"},\"wordCount\":247,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg\",\"keywords\":[\"Oracle\"],\"articleSection\":[\"Database management\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/\",\"name\":\"Flame Graph for quick identification of Oracle bug - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg\",\"datePublished\":\"2015-06-12T08:12:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"This blog post is about using perf and flame graphs to get the stack from several samples, rather than taking few stack dumps\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg\",\"width\":499,\"height\":275},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Flame Graph for quick identification of Oracle bug\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Flame Graph for quick identification of Oracle bug - dbi Blog","description":"This blog post is about using perf and flame graphs to get the stack from several samples, rather than taking few stack dumps","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/","og_locale":"en_US","og_type":"article","og_title":"Flame Graph for quick identification of Oracle bug","og_description":"This blog post is about using perf and flame graphs to get the stack from several samples, rather than taking few stack dumps","og_url":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/","og_site_name":"dbi Blog","article_published_time":"2015-06-12T08:12:07+00:00","og_image":[{"width":499,"height":275,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg","type":"image\/jpeg"}],"author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Flame Graph for quick identification of Oracle bug","datePublished":"2015-06-12T08:12:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/"},"wordCount":247,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg","keywords":["Oracle"],"articleSection":["Database management","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/","url":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/","name":"Flame Graph for quick identification of Oracle bug - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg","datePublished":"2015-06-12T08:12:07+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"This blog post is about using perf and flame graphs to get the stack from several samples, rather than taking few stack dumps","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureHighParse.jpg","width":499,"height":275},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/flame-graph-for-quick-identification-of-oracle-bug\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Flame Graph for quick identification of Oracle bug"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/4943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=4943"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/4943\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/4944"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=4943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=4943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=4943"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=4943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}