{"id":38232,"date":"2025-04-29T17:22:37","date_gmt":"2025-04-29T15:22:37","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=38232"},"modified":"2025-04-29T17:27:07","modified_gmt":"2025-04-29T15:27:07","slug":"oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/","title":{"rendered":"Oracle: A possible method to address a slow query if there is time pressure"},"content":{"rendered":"\n<p>Sometimes there is no time for a long analysis of a slow query and a fix (workaround) has to be provided asap. In such cases it often helps to check if a query did run faster with a previous OPTIMIZER_FEATURES_ENABLE-setting. If that is the case, then you also want to find out which optimizer bug fix caused a suboptimal plan to be generated. The following blog shows a way to find a quick workaround for a slowly performing query. However, please consider this to be a workaround and that you still should do an analysis to fix the &#8220;real&#8221; root cause.<\/p>\n\n\n\n<p>So, let&#8217;s consider that you have a performance issue with a query and you want to test if an optimizer bug fix caused a suboptimal plan. How can you find the optimizer bug fix which caused that plan asap? <\/p>\n\n\n\n<p>REMARK: I do assume that you have a script \/tmp\/sql.sql with the sql-query to reproduce the slowly running SQL. <\/p>\n\n\n\n<p>Let&#8217;s get started to find the optimizer bug-fix:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-problem-query-is-running-slow-in-19c-the-query-has-been-provided-in-the-script-tmp-sql-sql\">Problem: Query is running slow in 19c. The query has been provided in the script \/tmp\/sql.sql<\/h2>\n\n\n\n<p>Currently we are on 19.26. and do have OPTIMIZER_FEATURES_ENABLE set to the default, which is 19.1.0 in 19c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL&gt; show spparameter optimizer_features_enable\n\nSID\t NAME\t\t\t       TYPE\t   VALUE\n-------- ----------------------------- ----------- ----------------------------\n*\t optimizer_features_enable     string<\/code><\/pre>\n\n\n\n<p>&#8211;&gt; not explicitly set in the spfile, so it&#8217;s set to default:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL&gt; show parameter optimizer_features_enable\n\nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\noptimizer_features_enable            string      19.1.0\n\nSQL&gt; show parameter fix_control\nSQL&gt; <\/code><\/pre>\n\n\n\n<p>&#8211;&gt; no _fix_control-parameter set.<\/p>\n\n\n\n<p>According Active Session History (ASH) the query did run for days in the past (!!!):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL&gt;  select sql_exec_start, sql_plan_hash_value, (count(*)*10)\/3600 active_hours, max(sample_time)-min(sample_time) duration\n  2  from dba_hist_active_sess_history\n  3  where sql_id='8cdydzbsh10dd'\n  4  group by sql_exec_start, sql_plan_hash_value\n  5  order by 1;\n \nSQL_EXEC_START       SQL_PLAN_HASH_VALUE ACTIVE_HOURS DURATION\n-------------------- ------------------- ------------ ----------------------------\n05-APR-2025 07:36:03           126619261        80.12 +000000003 08:14:27.685\n07-APR-2025 07:36:07           126619261        32.33 +000000001 08:22:43.551\n08-APR-2025 16:06:00           126619261        47.68 +000000001 23:45:26.074\n10-APR-2025 15:57:22           126619261        17.76 +000000000 17:47:30.125\n19-APR-2025 05:32:25           126619261       178.23 +000000007 10:31:45.271\n21-APR-2025 05:32:46           126619261       134.60 +000000005 14:48:49.602\n23-APR-2025 05:33:08           126619261        86.01 +000000003 14:09:08.540\n \n7 rows selected.<\/code><\/pre>\n\n\n\n<p>REMARK: Please consider that using ASH requires the diagnostics pack to be licensed<\/p>\n\n\n\n<p>1. Check if there is an Optimizer-Version-Setting, where the issue did not happen<\/p>\n\n\n\n<p>We can test with different OPTIMIZER_FEATURES_ENABLE (OFE) settings, on what release this query may initially became slow with. But what different OPTIMIZER_FEATURES_ENABLE settings do we have? There&#8217;s a simple method to find that out. You just provide a non-existing OFE and the error tells you what OFE-settings are available:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL&gt; alter session set optimizer_features_enable=blabla;\nERROR:\nORA-00096: invalid value BLABLA for parameter optimizer_features_enable, must\nbe from among 19.1.0.1, 19.1.0, 18.1.0, 12.2.0.1, 12.1.0.2, 12.1.0.1, 11.2.0.4,\n11.2.0.3, 11.2.0.2, 11.2.0.1, 11.1.0.7, 11.1.0.6, 10.2.0.5, 10.2.0.4, 10.2.0.3,\n10.2.0.2, 10.2.0.1, 10.1.0.5, 10.1.0.4, 10.1.0.3, 10.1.0, 9.2.0.8, 9.2.0,\n9.0.1, 9.0.0, 8.1.7, 8.1.6, 8.1.5, 8.1.4, 8.1.3, 8.1.0, 8.0.7, 8.0.6, 8.0.5,\n8.0.4, 8.0.3, 8.0.0<\/code><\/pre>\n\n\n\n<p>So now we can go backwards with OFE-settings to find a version where the query may have run fast:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alter session set OPTIMIZER_FEATURES_ENABLE='18.1.0';\n@\/tmp\/sql.sql\n\n--&gt; Ctrl-C after some time.\n\nalter session set OPTIMIZER_FEATURES_ENABLE='12.2.0.1';\n@\/tmp\/sql.sql\n\n--&gt; Ctrl-C after some time.\n\nalter session set OPTIMIZER_FEATURES_ENABLE='12.1.0.2';\n@\/tmp\/sql.sql\n\n--&gt; Ctrl-C after some time.\n\nalter session set OPTIMIZER_FEATURES_ENABLE='12.1.0.1';\n@\/tmp\/sql.sql\n\n--&gt; Ctrl-C after some time.\n\nalter session set OPTIMIZER_FEATURES_ENABLE='11.2.0.4';\n@\/tmp\/sql.sql\n\n--&gt; Ctrl-C after some time.\n\nalter session set OPTIMIZER_FEATURES_ENABLE='11.2.0.3';\n@\/tmp\/sql.sql\n\n--&gt; Ctrl-C after some time.\n\nalter session set OPTIMIZER_FEATURES_ENABLE='11.2.0.2';\n@\/tmp\/sql.sql\n\n--&gt; Ctrl-C after some time.\n\nalter session set OPTIMIZER_FEATURES_ENABLE='11.2.0.1';\n@\/tmp\/sql.sql\n\nElapsed: 00:00:00.36\n\n--&gt; With 11.2.0.1 the query finished in 0.36 secs.<\/code><\/pre>\n\n\n\n<p>I.e. a change between 11.2.0.1 and 11.2.0.2 caused the optimizer to produce a suboptimal plan.<\/p>\n\n\n\n<p>2. Test which bug fix caused the suboptimal plan<\/p>\n\n\n\n<p>We can generate a script, which tests all _fix_control-settings which were introduced with OFE=11.2.0.2 to see what fix caused the query to run slow:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>set lines 200 pages 999 trimspool on\nspool \/tmp\/sql_fc.sql\n\nselect 'alter session set \"_fix_control\"='''||to_char(bugno)||':'||to_char(value)||''';'||chr(10)||\n       'PROMPT '||to_char(bugno)||chr(10)||\n       '@\/tmp\/sql.sql' \nfrom v$system_fix_control \nwhere OPTIMIZER_FEATURE_ENABLE='11.2.0.2';\n\n...\n\nspool off<\/code><\/pre>\n\n\n\n<p>REMARK: The CHR(10) inserts the necessary linefeeds in the script.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL&gt; !vi \/tmp\/sql_fc.sql\n--&gt; remove all lines, which are not necessary\nSQL&gt; !cat \/tmp\/sql_fc.sql\nalter session set \"_fix_control\"='6913094:1';\nPROMPT 6913094\n@\/tmp\/sql.sql\n\nalter session set \"_fix_control\"='6670551:1';\nPROMPT 6670551\n@\/tmp\/sql.sql\n\n...\n\nalter session set \"_fix_control\"='9407929:1';\nPROMPT 9407929\n@\/tmp\/sql.sql\n\nalter session set \"_fix_control\"='10359631:1';\nPROMPT 10359631\n@\/tmp\/sql.sql\n\nSQL&gt; <\/code><\/pre>\n\n\n\n<p>First I do set OFE to 11.2.0.1 and then run my generated script to enable the fixes one after the other until it becomes slow:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL&gt; alter session set optimizer_features_enable='11.2.0.1';\nSQL&gt; @?\/tmp\/sql_fc.sql\n\nSession altered.\n\n8602840\n\n1 row selected.\n\n\nSession altered.\n\n8725296\n\n1 row selected.\n\n...\n\nSession altered.\n\n9443476\n\n1 row selected.\n\n\nSession altered.\n\n9195582\n\n--&gt; after enabling fix for bugno 9195582 there is no output generated anymore, i.e. the query becomes slow.<\/code><\/pre>\n\n\n\n<p>So, we could identify the fix for bugno 9195582, which causes the optimizer to produce a suboptimal plan.<\/p>\n\n\n\n<p>3. Details about bug 9195582 and the implementation of a workaround<\/p>\n\n\n\n<p>The description field of v$system_fix_control provides more details about the bug-fix:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL&gt; select description from v$system_fix_control where bugno=9195582;\n\nDESCRIPTION\n----------------------------------------------------------------\nleaf blocks as upper limit for skip scan blocks\nSQL&gt; <\/code><\/pre>\n\n\n\n<p>Searching in My Oracle SUpport for the bug resulted in MOS Note<\/p>\n\n\n\n<p>Bug 9195582 &#8211; Skip Scan overcosted when an index column has high NDV (Doc ID 9195582.8)<\/p>\n\n\n\n<p>In there we have the following description:<\/p>\n\n\n\n<p>Symptoms:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nPerformance Of Query\/ies Affected \n<\/pre><\/div>\n\n\n<p>Description<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nThe estimate for skip scan blocks will now be no more than leaf blocks.\nIndex skip scans will be used more often than previously.\n\nREDISCOVERY INFORMATION:\nIf an index skip scan is not being selected for a query due to having a\nhigh cost and one of the skip scan index columns has NDV which is higher\nthan the number of leaf blocks of the index then you may be facing this\nbug.\n\nWorkaround\nForce the skip scan using a hint.\n<\/pre><\/div>\n\n\n<p>Interestingly the faster plan did not have a skip scan in it, but a change in the estimation of blocks for skip scans, may of course also lead to other plans being skipped or considered.<\/p>\n\n\n\n<p>At this point I did a relogin to the DB and ran my query with the appropriate fix turned off to verify that the query runs fast:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SQL&gt; select value from v$session_fix_control where bugno=9195582;\n\n     VALUE\n----------\n         1\n\nSQL&gt; alter session set \"_fix_control\"='9195582:OFF';\n\nSession altered.\n\nSQL&gt; select value from v$session_fix_control where bugno=9195582;\n\n     VALUE\n----------\n         0\n\nSQL&gt; @\/tmp\/sql.sql\n\nElapsed: 00:00:00.36\n\n--&gt; OK, it works around the issue.\n<\/code><\/pre>\n\n\n\n<p>For that workaround to become active, we can implement a SQL patch for the query with the issue. As I did not have the query anymore in the shared pool, I had to take the query text from Automatic Workload Repository (AWR) to create the SQL Patch:<\/p>\n\n\n\n<p>REMARK: Again, please consider that AWR requires to diagnostics pack to be licensed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>set serveroutput on\ndeclare\n        v1      varchar2(128);\n        v_sql   clob;\nbegin\n        select sql_text into v_sql from dba_hist_sqltext where sql_id='8cdydzbsh10dd';\n        v1 :=   dbms_sqldiag.create_sql_patch(\n                        sql_text  =&gt; v_sql,\n                        hint_text =&gt; q'{opt_param('_fix_control' '9195582:OFF')}',\n                        name    =&gt; 'switch_off_fix_9195582'\n                );\n        dbms_output.put_line(v1);\nend;\n\/\nswitch_off_fix_9195582\n\nPL\/SQL procedure successfully completed.<\/code><\/pre>\n\n\n\n<p>Later on you may check if the query runs fast by checking the data in the shared pool or in the AWR history:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select executions, (elapsed_time\/executions)\/1000000 avg_elapsed_secs, sql_patch from v$sql where sql_id='8cdydzbsh10dd';<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-summary\">Summary:<\/h2>\n\n\n\n<p>Sometimes you have to be fast to implement a workaround for a slowly running query. One option is to check if a query did run faster with older OPTIMIZER_FEATURES_ENABLE-settings and, if that is the case, identify the bugno which caused a suboptimal plan to be produced. Always implement only the smallest change possible (just disable a bug fix instead of going back to a previous OFE-setting) and change as local to the problem as possible (i.e. add a hint or a SQL Patch to a query and, if possible, do not change a parameter on session or even system level). And finally, document your change and try to get rid of that workaround as soon as you have time to do a deeper analysis.<\/p>\n\n\n\n<p>The Oracle Support tool SQLTXPLAIN (see MOS Note &#8220;All About the SQLT Diagnostic Tool (Doc ID 215187.1)&#8221;) contains the XPLORE utility, which goes much deeper for a single SQL-statement and checks the plan change caused by all &#8220;_fix_control&#8221;-settings and optimizer-changes (underscore parameters) between releases and produces html-output.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes there is no time for a long analysis of a slow query and a fix (workaround) has to be provided asap. In such cases it often helps to check if a query did run faster with a previous OPTIMIZER_FEATURES_ENABLE-setting. If that is the case, then you also want to find out which optimizer bug [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[59],"tags":[3604,3603,3605],"type_dbi":[2728],"class_list":["post-38232","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-_fix_control","tag-optimizer_features_enable","tag-slow-query","type-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>Oracle: A possible method to address a slow query if there is time pressure - dbi Blog<\/title>\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\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle: A possible method to address a slow query if there is time pressure\" \/>\n<meta property=\"og:description\" content=\"Sometimes there is no time for a long analysis of a slow query and a fix (workaround) has to be provided asap. In such cases it often helps to check if a query did run faster with a previous OPTIMIZER_FEATURES_ENABLE-setting. If that is the case, then you also want to find out which optimizer bug [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-29T15:22:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-29T15:27:07+00:00\" \/>\n<meta name=\"author\" content=\"Clemens Bleile\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ifgtxD2SrQ8r!YuXj\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Clemens Bleile\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 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\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/\"},\"author\":{\"name\":\"Clemens Bleile\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0ac04011f60f2e93c115358d0789c2da\"},\"headline\":\"Oracle: A possible method to address a slow query if there is time pressure\",\"datePublished\":\"2025-04-29T15:22:37+00:00\",\"dateModified\":\"2025-04-29T15:27:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/\"},\"wordCount\":832,\"commentCount\":0,\"keywords\":[\"_fix_control\",\"optimizer_features_enable\",\"slow query\"],\"articleSection\":[\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/\",\"name\":\"Oracle: A possible method to address a slow query if there is time pressure - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2025-04-29T15:22:37+00:00\",\"dateModified\":\"2025-04-29T15:27:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0ac04011f60f2e93c115358d0789c2da\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle: A possible method to address a slow query if there is time pressure\"}]},{\"@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\/0ac04011f60f2e93c115358d0789c2da\",\"name\":\"Clemens Bleile\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g\",\"caption\":\"Clemens Bleile\"},\"description\":\"Clemens Bleile has more than 30 years of IT experience, thirteen in Oracle Support and fifteen in Oracle Consulting. He is specialized in Oracle Database Performance Tuning (SQL Tuning, DB Tuning) and developing an Oracle DB IT architecture (highly available, low-maintenance, cost efficient storage of data). He is an expert in problem analysis and resolution. Prior to joining dbi services, Clemens Bleile was Manager of the EMEA Database Performance team at the Oracle Global Customer Support Services. Clemens Bleile is Oracle Certified Professional 11g, 12c and Oracle Certified Expert for Performance Management and Tuning and holds a Master Degree, Business Information Systems from the Fachhochschule Furtwangen, Germany.\",\"sameAs\":[\"https:\/\/www.dbi-services.com\",\"https:\/\/x.com\/ifgtxD2SrQ8r!YuXj\"],\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/clemens-bleile\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Oracle: A possible method to address a slow query if there is time pressure - dbi Blog","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\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/","og_locale":"en_US","og_type":"article","og_title":"Oracle: A possible method to address a slow query if there is time pressure","og_description":"Sometimes there is no time for a long analysis of a slow query and a fix (workaround) has to be provided asap. In such cases it often helps to check if a query did run faster with a previous OPTIMIZER_FEATURES_ENABLE-setting. If that is the case, then you also want to find out which optimizer bug [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/","og_site_name":"dbi Blog","article_published_time":"2025-04-29T15:22:37+00:00","article_modified_time":"2025-04-29T15:27:07+00:00","author":"Clemens Bleile","twitter_card":"summary_large_image","twitter_creator":"@ifgtxD2SrQ8r!YuXj","twitter_misc":{"Written by":"Clemens Bleile","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/"},"author":{"name":"Clemens Bleile","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0ac04011f60f2e93c115358d0789c2da"},"headline":"Oracle: A possible method to address a slow query if there is time pressure","datePublished":"2025-04-29T15:22:37+00:00","dateModified":"2025-04-29T15:27:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/"},"wordCount":832,"commentCount":0,"keywords":["_fix_control","optimizer_features_enable","slow query"],"articleSection":["Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/","url":"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/","name":"Oracle: A possible method to address a slow query if there is time pressure - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2025-04-29T15:22:37+00:00","dateModified":"2025-04-29T15:27:07+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0ac04011f60f2e93c115358d0789c2da"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-a-possible-method-to-address-a-slow-query-if-there-is-time-pressure\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Oracle: A possible method to address a slow query if there is time pressure"}]},{"@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\/0ac04011f60f2e93c115358d0789c2da","name":"Clemens Bleile","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1f596609fc67cb28ed714e7bccc81ed4cd73b8582a8148a490c77daeb2fde21a?s=96&d=mm&r=g","caption":"Clemens Bleile"},"description":"Clemens Bleile has more than 30 years of IT experience, thirteen in Oracle Support and fifteen in Oracle Consulting. He is specialized in Oracle Database Performance Tuning (SQL Tuning, DB Tuning) and developing an Oracle DB IT architecture (highly available, low-maintenance, cost efficient storage of data). He is an expert in problem analysis and resolution. Prior to joining dbi services, Clemens Bleile was Manager of the EMEA Database Performance team at the Oracle Global Customer Support Services. Clemens Bleile is Oracle Certified Professional 11g, 12c and Oracle Certified Expert for Performance Management and Tuning and holds a Master Degree, Business Information Systems from the Fachhochschule Furtwangen, Germany.","sameAs":["https:\/\/www.dbi-services.com","https:\/\/x.com\/ifgtxD2SrQ8r!YuXj"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/clemens-bleile\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/38232","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\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=38232"}],"version-history":[{"count":6,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/38232\/revisions"}],"predecessor-version":[{"id":38239,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/38232\/revisions\/38239"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=38232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=38232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=38232"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=38232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}