{"id":11010,"date":"2018-03-09T21:44:56","date_gmt":"2018-03-09T20:44:56","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/"},"modified":"2023-07-07T10:11:17","modified_gmt":"2023-07-07T08:11:17","slug":"enabled-accepted-fixed-sql-plan-baselines","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/","title":{"rendered":"Enabled, Accepted, Fixed SQL Plan Baselines"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nWhen the documentation is not always clear, I prefer to build a test case to be sure about the behavior in different context and different versions. Here is a test on SQL Plan Management to show which plan is chosen among the different states of SQL Plan Baselines: Enabled, Accepted, Fixed. Thanks to Oracle ACE program, I have some Oracle Cloud credits to quickly provision a database, so I tested that on Oracle 18c.<br \/>\n<!--more--><br \/>\nFor this test, I&#8217;ve created a table:<\/p>\n<pre><code>\ncreate table DEMO as select rownum n from xmltable('1 to 10000');\n<\/code><\/pre>\n<p>with 8 indexes:<\/p>\n<pre><code>\nexec for i in 1..8 loop execute immediate 'create index DEMO'||i||' on DEMO(n,'||i||')'; end loop;\n<\/code><\/pre>\n<p>and a procedure to query it several times, setting random costs for the indexes, with only one cheapest:<\/p>\n<pre><code>\ncreate or replace procedure runplans(n number) as\n dummy number;\nbegin\n-- run all this 30 times\nfor k in 1..30 loop\n run from index DEMO1 to DEMOt with one of them cheaper each time\n for t in 1..n loop\n  -- set random cost for all indexes\n  for i in 1..8 loop dbms_stats.set_index_stats(user,'DEMO'||i,indlevel=&gt;round(dbms_random.value(10,100)),no_invalidate=&gt;true); end loop;\n  -- set cheap cost for index DEMOt\n  dbms_stats.set_index_stats(user,'DEMO'||t,indlevel=&gt;1,no_invalidate=&gt;true);\n  -- change some parameters to parse new child\n  execute immediate 'alter session set optimizer_index_caching='||(t*8+k);\n  -- query with an index hint but not specifying the index so the cheaper is chosen\n  select \/*+ index(DEMO) *\/ n into dummy from DEMO where n=1;\n end loop;\nend loop;\nend;\n\/\n<\/code><\/pre>\n<p>So you understand the idea: have 8 possible execution plans, with one cheaper than the others. And the goal is to see which one is chosen depending of the state of the SQL Plan Baseline.<\/p>\n<p>I will play with the baselines and will display the cursor execution with the following SQLcl alias:<\/p>\n<pre><code>\nSQL&gt; alias sqlpb=select sql_id,plan_hash_value,sum(executions),sql_plan_baseline,id,object_name from v$sql join v$sql_plan using(sql_id,plan_hash_value,child_number) where sql_text like 'SELECT % FROM DEMO%' and id=1 group by sql_id,plan_hash_value,sql_plan_baseline,id,object_name order by 3;\n<\/code><\/pre>\n<p>So, I call my procedure to run the query 30 times when index DEMO1 is the cheapest:<\/p>\n<pre><code>\nSQL&gt; exec runplans(1)\nPL\/SQL procedure successfully completed.\n<\/code><\/pre>\n<p>Here is my alias to show the 30 executions using DEMO1 (object_name from v$sqlplan):<\/p>\n<pre><code>\nSQL&gt; sqlpb\n\u00a0\nSQL_ID            PLAN_HASH_VALUE   SUM(EXECUTIONS) SQL_PLAN_BASELINE     ID OBJECT_NAME\n-------------     ---------------   --------------- --------------------  -- -----------\ngqnkn2d17zjvv          3739632713                30                        1 DEMO1\n<\/code><\/pre>\n<p>I load this to SPM<\/p>\n<pre><code>\nSQL&gt; exec dbms_output.put_line(dbms_spm.load_plans_from_cursor_cache(sql_id=&gt;'gqnkn2d17zjvv'));\nPL\/SQL procedure successfully completed.\n<\/code><\/pre>\n<p>Here is my SQL Plan Baseline, enabled and accepted:<\/p>\n<pre><code>\nSQL&gt; select plan_name,enabled,accepted,fixed,executions from dba_sql_plan_baselines;\n\u00a0\nPLAN_NAME                        ENABLED   ACCEPTED   FIXED     EXECUTIONS\n------------------------------   -------   --------   -----     ----------\nSQL_PLAN_dcc9d14j7k1vu97e16a35   YES       YES        NO                30\n<\/code><\/pre>\n<p>Now I run my procedure to run 30 times the cursor and for each, 8 times with one different index being the cheapest:<\/p>\n<pre><code>\nSQL&gt; exec runplans(8)\nPL\/SQL procedure successfully completed.\n<\/code><\/pre>\n<p>So all executions have used the only one SQL Plan Baseline which is enabled and accepted:<\/p>\n<pre><code>\nSQL&gt; sqlpb\n\u00a0\nSQL_ID            PLAN_HASH_VALUE   SUM(EXECUTIONS) SQL_PLAN_BASELINE                  ID OBJECT_NAME\n-------------     ---------------   --------------- ---------------------------------  -- -----------\ngqnkn2d17zjvv          3739632713               232 SQL_PLAN_dcc9d14j7k1vu97e16a35      1 DEMO1\n<\/code><\/pre>\n<p>And the other plans (because only 8 of them had this DEMO1 plan being the cheapest) were loaded, enabled but not accepted:<\/p>\n<pre><code>\nSQL&gt; select plan_name,enabled,accepted,fixed,executions from dba_sql_plan_baselines;\n\u00a0\nPLAN_NAME                        ENABLED   ACCEPTED   FIXED     EXECUTIONS\n------------------------------   -------   --------   -----     ----------\nSQL_PLAN_dcc9d14j7k1vu287d1344   YES       NO         NO                 0\nSQL_PLAN_dcc9d14j7k1vu452ab005   YES       NO         NO                 0\nSQL_PLAN_dcc9d14j7k1vu4564f9cd   YES       NO         NO                 0\nSQL_PLAN_dcc9d14j7k1vu4cdc9ee7   YES       NO         NO                 0\nSQL_PLAN_dcc9d14j7k1vu5353a77e   YES       NO         NO                 0\nSQL_PLAN_dcc9d14j7k1vu97e16a35   YES       YES        NO                30\nSQL_PLAN_dcc9d14j7k1vuc6a3f323   YES       NO         NO                 0\nSQL_PLAN_dcc9d14j7k1vufb8f9e5a   YES       NO         NO                 0\n<\/code><\/pre>\n<p>Now, I change the status of the baselines to get all combinations of enabled, fixed and accepted, and in addition to that change the plan name to tne line of plan which differs:<\/p>\n<pre><code>\nSQL&gt; begin\n  2    for i in (select rownum n,plan_name from dba_sql_plan_baselines) loop\n  3     if i.n in (2,4,6,8) then dbms_output.put_line(dbms_spm.evolve_sql_plan_baseline(plan_name=&gt;i.plan_name,verify=&gt;'no',commit=&gt;'yes')); end if;\n  4     if i.n in (1,2,5,6) then dbms_output.put_line(dbms_spm.alter_sql_plan_baseline(plan_name=&gt;i.plan_name,attribute_name=&gt;'enabled',attribute_value=&gt;'no')); end if;\n  5     if i.n in (5,6,7,8) then dbms_output.put_line(dbms_spm.alter_sql_plan_baseline(plan_name=&gt;i.plan_name,attribute_name=&gt;'fixed',attribute_value=&gt;'yes')); end if;\n  6     for p in ( select plan_table_output from dbms_xplan.display_sql_plan_baseline(plan_name=&gt;i.plan_name,format=&gt;'basic') where plan_table_output like '%| DEMO%' ) loop\n  7      dbms_output.put_line(dbms_spm.alter_sql_plan_baseline(plan_name=&gt;i.plan_name,attribute_name=&gt;'plan_name',attribute_value=&gt;p.plan_table_output));\n  8     end loop;\n  9    end loop;\n 10  end;\n 11  \/\n<\/code><\/pre>\n<p>So here they are, with their new name:<\/p>\n<pre><code>\nSQL&gt; select plan_name,enabled,accepted,fixed,executions from dba_sql_plan_baselines;\n\u00a0\nPLAN_NAME                            ENABLED   ACCEPTED   FIXED     EXECUTIONS\n----------------------------------   -------   --------   -----     ----------\n|   1 |  INDEX RANGE SCAN| DEMO4 |   NO        NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO3 |   NO        YES        NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO2 |   YES       NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO6 |   YES       YES        NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO5 |   NO        NO         YES                0\n|   1 |  INDEX RANGE SCAN| DEMO1 |   NO        YES        YES               30\n|   1 |  INDEX RANGE SCAN| DEMO8 |   YES       NO         YES                0\n|   1 |  INDEX RANGE SCAN| DEMO7 |   YES       YES        YES                0\n<\/code><\/pre>\n<h3>Fixed plans have priority<\/h3>\n<p>I flush the shared pool and run my 240 statements again:<\/p>\n<pre><code>\nSQL&gt; alter system flush shared_pool;\nSystem FLUSH altered\nSQL&gt; exec runplans(8)\nPL\/SQL procedure successfully completed.\n<\/code><\/pre>\n<p>Here is the result in V$SQL, only one plan used for all those executions:<\/p>\n<pre><code>\nSQL&gt; sqlpb\n\u00a0\nSQL_ID            PLAN_HASH_VALUE   SUM(EXECUTIONS) SQL_PLAN_BASELINE                      ID OBJECT_NAME\n-------------     ---------------   --------------- -------------------------------------  -- -----------\ngqnkn2d17zjvv          1698325646               240 |   1 |  INDEX RANGE SCAN| DEMO7 |      1 DEMO7\n<\/code><\/pre>\n<p>The only possible plans are those that are enabled and accepted, which are the DEMO6 and DEMO7 ones. However, fixed plans have a priority, so even when the CBO came with the DEMO6 plan it was not used. When there are fixed enabled accepted SQL Plan Baseline, those are the only one considered.<\/p>\n<h3>Enabled and Accepted are used<\/h3>\n<p>Now setting all fixed attribute to no:<\/p>\n<pre><code>\nSQL&gt; begin\n  2    for i in (select rownum n,plan_name from dba_sql_plan_baselines) loop\n  3     dbms_output.put_line(dbms_spm.alter_sql_plan_baseline(plan_name=&gt;i.plan_name,attribute_name=&gt;'fixed',attribute_value=&gt;'no'));\n  4    end loop;\n  5  end;\n  6  \/\nPL\/SQL procedure successfully completed.\n\u00a0\nSQL&gt; select plan_name,enabled,accepted,fixed,executions from dba_sql_plan_baselines;\nPLAN_NAME                            ENABLED   ACCEPTED   FIXED     EXECUTIONS\n----------------------------------   -------   --------   -----     ----------\n|   1 |  INDEX RANGE SCAN| DEMO4 |   NO        NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO3 |   NO        YES        NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO2 |   YES       NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO6 |   YES       YES        NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO5 |   NO        NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO1 |   NO        YES        NO                30\n|   1 |  INDEX RANGE SCAN| DEMO8 |   YES       NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO7 |   YES       YES        NO                 0\n<\/code><\/pre>\n<p>Here is another run:<\/p>\n<pre><code>\nSQL&gt; alter system flush shared_pool;\nSystem FLUSH altered.\nSQL&gt; exec runplans(8)\nPL\/SQL procedure successfully completed.\n\u00a0\nSQL&gt; sqlpb\n\u00a0\nSQL_ID            PLAN_HASH_VALUE   SUM(EXECUTIONS) SQL_PLAN_BASELINE                      ID OBJECT_NAME\n-------------     ---------------   --------------- -------------------------------------  -- -----------\ngqnkn2d17zjvv          1698325646                95 |   1 |  INDEX RANGE SCAN| DEMO7 |      1 DEMO7\ngqnkn2d17zjvv          3449379882               145 |   1 |  INDEX RANGE SCAN| DEMO6 |      1 DEMO6\n<\/code><\/pre>\n<p>Now that there are no fixed plans taking the priority, all enabled and accepted plans are possible, but only them.<\/p>\n<h3>All possible plans in the baseline but none enabled and accepted<\/h3>\n<p>Then what happens when all possible plans are in the SQL Plan Baseline but none of them are both enabled and accepted?<\/p>\n<pre><code>\nSQL&gt; begin\n  2    for i in (select rownum n,plan_name from dba_sql_plan_baselines where accepted='YES') loop\n  3     dbms_output.put_line(dbms_spm.alter_sql_plan_baseline(plan_name=&gt;i.plan_name,attribute_name=&gt;'enabled',attribute_value=&gt;'no'));\n  4    end loop;\n  5  end;\n  6  \/\n\u00a0\nSQL&gt; select plan_name,enabled,accepted,fixed,executions from dba_sql_plan_baselines;\n\u00a0\nPLAN_NAME                            ENABLED   ACCEPTED   FIXED     EXECUTIONS\n----------------------------------   -------   --------   -----     ----------\n|   1 |  INDEX RANGE SCAN| DEMO4 |   NO        NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO3 |   NO        YES        NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO2 |   YES       NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO6 |   NO        YES        NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO5 |   NO        NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO1 |   NO        YES        NO                30\n|   1 |  INDEX RANGE SCAN| DEMO8 |   YES       NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO7 |   NO        YES        NO                 0\n<\/code><\/pre>\n<p>So all combinations of indexes are there (and my query forces index access with a hint) but none are accepted and enabled.<\/p>\n<pre><code>\nSQL&gt; alter system flush shared_pool;\nSystem FLUSH altered.\nSQL&gt; exec runplans(8)\nPL\/SQL procedure successfully completed.\n\u00a0\nSQL&gt; sqlpb\nSQL_ID            PLAN_HASH_VALUE   SUM(EXECUTIONS) SQL_PLAN_BASELINE     ID OBJECT_NAME\n-------------     ---------------   --------------- --------------------  -- -----------\ngqnkn2d17zjvv          3739632713                 8                        1 DEMO1\ngqnkn2d17zjvv          4234411015                16                        1 DEMO2\ngqnkn2d17zjvv          2199479965                24                        1 DEMO3\ngqnkn2d17zjvv          1698325646                30                        1 DEMO7\ngqnkn2d17zjvv          3449379882                30                        1 DEMO6\ngqnkn2d17zjvv          2144220082                30                        1 DEMO5\ngqnkn2d17zjvv           918903766                30                        1 DEMO4\ngqnkn2d17zjvv            39208404                72                        1 DEMO8\n<\/code><\/pre>\n<p>When there are no enabled and accepted plans, then anything is possible and each execution keeps the one the CBO came with.<\/p>\n<h3>None enabled and accepted, but new plan possible<\/h3>\n<p>Now, in order to have a new plan possible I&#8217;ll still run the same query but after dropping all indexes.<\/p>\n<pre><code>\nSQL&gt; exec for i in 1..8 loop execute immediate 'drop index DEMO'||i; end loop;\nPL\/SQL procedure successfully completed.\n<\/code><\/pre>\n<p>I&#8217;ve run the same as before but without the dbms_stats calls.<\/p>\n<p>Here all executions have run with the only possible plan: a full table scan:<\/p>\n<pre><code>\nSQL&gt; select sql_id,plan_hash_value,sum(executions),sql_plan_baseline,id,object_name from v$sql join v$sql_plan using(sql_id,plan_hash_value,child_number) where sql_text like 'SELECT % FROM DEMO%' and id=1 group by sql_id,plan_hash_value,sql_plan_baseline,id,object_name order by 3\n\u00a0\nSQL_ID            PLAN_HASH_VALUE   SUM(EXECUTIONS) SQL_PLAN_BASELINE     ID OBJECT_NAME\n-------------     ---------------   --------------- --------------------  -- -----------\ngqnkn2d17zjvv          4000794843                29                        1 DEMO\n<\/code><\/pre>\n<p>this plan has been added, enabled but not accepted, to the SQL Plan Baseline:<\/p>\n<pre><code>\nSQL&gt; select plan_name,enabled,accepted,fixed,executions from dba_sql_plan_baselines;\n\u00a0\nPLAN_NAME                            ENABLED   ACCEPTED   FIXED     EXECUTIONS\n-------------     ---------------   --------------- --------------------  -- -----------\n|   1 |  INDEX RANGE SCAN| DEMO4 |   NO        NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO3 |   NO        YES        NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO2 |   YES       NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO6 |   NO        YES        NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO5 |   NO        NO         NO                 0\nSQL_PLAN_dcc9d14j7k1vu838f84a8       YES       NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO1 |   NO        YES        NO                30\n|   1 |  INDEX RANGE SCAN| DEMO8 |   YES       NO         NO                 0\n|   1 |  INDEX RANGE SCAN| DEMO7 |   NO        YES        NO                 0\n<\/code><\/pre>\n<p>Not accepted means that it cannot be used. But as there are no other plan possible, it will be used anyway.<\/p>\n<p>In summary:<br \/>\nFixed plans are like telling to the optimizer: You must use one of these.<br \/>\nEnabled accepted plans are like telling the optimizer: You should use one of these.<br \/>\nDisabled or non-accepted plans are like telling the optimizer: Try to find another plan.<br \/>\nThe optimizer will always come with a plan, so if the rules cannot be applied, the optimizer best-estimated plan is used. It may be a non-enabled or non-accepted plan. Or it can be a new plan, which will then be added as non accepted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . When the documentation is not always clear, I prefer to build a test case to be sure about the behavior in different context and different versions. Here is a test on SQL Plan Management to show which plan is chosen among the different states of SQL Plan Baselines: Enabled, Accepted, Fixed. [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[59],"tags":[1184,664],"type_dbi":[],"class_list":["post-11010","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-oracle-18c","tag-spm"],"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>Enabled, Accepted, Fixed SQL Plan Baselines - 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\/enabled-accepted-fixed-sql-plan-baselines\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enabled, Accepted, Fixed SQL Plan Baselines\" \/>\n<meta property=\"og:description\" content=\"By Franck Pachot . When the documentation is not always clear, I prefer to build a test case to be sure about the behavior in different context and different versions. Here is a test on SQL Plan Management to show which plan is chosen among the different states of SQL Plan Baselines: Enabled, Accepted, Fixed. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-09T20:44:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-07T08:11:17+00:00\" \/>\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=\"3 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\/enabled-accepted-fixed-sql-plan-baselines\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Enabled, Accepted, Fixed SQL Plan Baselines\",\"datePublished\":\"2018-03-09T20:44:56+00:00\",\"dateModified\":\"2023-07-07T08:11:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/\"},\"wordCount\":680,\"commentCount\":5,\"keywords\":[\"Oracle 18c\",\"SPM\"],\"articleSection\":[\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/\",\"name\":\"Enabled, Accepted, Fixed SQL Plan Baselines - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2018-03-09T20:44:56+00:00\",\"dateModified\":\"2023-07-07T08:11:17+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enabled, Accepted, Fixed SQL Plan Baselines\"}]},{\"@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":"Enabled, Accepted, Fixed SQL Plan Baselines - 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\/enabled-accepted-fixed-sql-plan-baselines\/","og_locale":"en_US","og_type":"article","og_title":"Enabled, Accepted, Fixed SQL Plan Baselines","og_description":"By Franck Pachot . When the documentation is not always clear, I prefer to build a test case to be sure about the behavior in different context and different versions. Here is a test on SQL Plan Management to show which plan is chosen among the different states of SQL Plan Baselines: Enabled, Accepted, Fixed. [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/","og_site_name":"dbi Blog","article_published_time":"2018-03-09T20:44:56+00:00","article_modified_time":"2023-07-07T08:11:17+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Enabled, Accepted, Fixed SQL Plan Baselines","datePublished":"2018-03-09T20:44:56+00:00","dateModified":"2023-07-07T08:11:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/"},"wordCount":680,"commentCount":5,"keywords":["Oracle 18c","SPM"],"articleSection":["Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/","url":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/","name":"Enabled, Accepted, Fixed SQL Plan Baselines - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2018-03-09T20:44:56+00:00","dateModified":"2023-07-07T08:11:17+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/enabled-accepted-fixed-sql-plan-baselines\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Enabled, Accepted, Fixed SQL Plan Baselines"}]},{"@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\/11010","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=11010"}],"version-history":[{"count":1,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11010\/revisions"}],"predecessor-version":[{"id":26592,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11010\/revisions\/26592"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=11010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=11010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=11010"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=11010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}