{"id":3472,"date":"2020-08-30T13:34:32","date_gmt":"2020-08-30T13:34:32","guid":{"rendered":"https:\/\/nenadnoveljic.com\/blog\/?p=3472"},"modified":"2020-08-30T13:38:12","modified_gmt":"2020-08-30T13:38:12","slug":"or-expansion-of-subqueries-limitations","status":"publish","type":"post","link":"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/","title":{"rendered":"OR-Expansion of Subqueries &#8211; Limitations"},"content":{"rendered":"<p>Oracle introduced cost based OR-expansion (ORE) in 12.2, and then significantly enhanced it in 19c to include subqueries <a href=\"https:\/\/jonathanlewis.wordpress.com\/2020\/08\/19\/subquery-with-or-3\/\">[1]<\/a>. But this improvement doesn&#8217;t work for <a href=\"https:\/\/nenadnoveljic.com\/blog\/disjunctive-subquery-optimization\/\">my old test case <\/a>. As it turned out, undocumented heuristics and a bug prevent the transformation.<\/p>\n<p>Here&#8217;s what I learned.<\/p>\n<h1>Data<\/h1>\n<pre><code>drop table t_large ;\ndrop table t_small ;\n\ncreate table t_large ( id number , a number not null ) ;\ncreate table t_small ( b number , c number ) ;\n\ninsert into t_large\nSELECT level,level\nFROM   dual\nCONNECT BY level &lt;= 1000000;\n\ninsert into t_small values (1,1) ;\ninsert into t_small values (2,2) ;\n\ncommit ;\n\nexec dbms_stats.gather_table_stats(null, 'T_LARGE');\nexec dbms_stats.gather_table_stats(null, 'T_SMALL');<\/code><\/pre>\n<h1>Unnesting without ORE<\/h1>\n<p>I&#8217;ll start this demo with subquery unnesting (SU), which is a prerequisite for ORE:<\/p>\n<p><b>Query A<\/b><\/p>\n<pre><code>select \/*+ qb_name(main) *\/ a from t_large l \n  where id in ( select \/*+ qb_name(sbq) *\/ b from t_small s );<\/code><\/pre>\n<pre><code>---------------------------------------------------------------------------------\n| Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time     |\n---------------------------------------------------------------------------------\n|   0 | SELECT STATEMENT     |          |       |       |   <span style=\"color: green;\">576<\/span> (100)|          |\n|*  1 |  HASH JOIN RIGHT SEMI|          |     2 |    46 |   576   (3)| 00:00:01 |\n|   2 |   VIEW               | VW_NSO_1 |     2 |    26 |     2   (0)| 00:00:01 |\n|   3 |    TABLE ACCESS FULL | T_SMALL  |     2 |     6 |     2   (0)| 00:00:01 |\n|   4 |   TABLE ACCESS FULL  | T_LARGE  |  1000K|  9765K|   569   (2)| 00:00:01 |\n---------------------------------------------------------------------------------\n\nPredicate Information (identified by operation id):\n---------------------------------------------------\n\n   1 - access(\"ID\"=\"B\")<\/code><\/pre>\n<p>SU is, expectedly, a cost based decision:<\/p>\n<pre><code>SU:   Passed validity checks, but requires costing.<\/code><\/pre>\n<p>SU opens up new possibilities for the optimizer when searching for an optimal plan.<\/p>\n<h1>FILTER without ORE<\/h1>\n<p>Without SU, the optimizer generates an inferior plan with FILTER:<\/p>\n<p><b>Query B (no_unnest hint added to the Query A)<\/b><\/p>\n<pre><code>select  \/*+ qb_name(main) *\/ a from t_large l \n  where id in ( select \/*+ <span style=\"color: red;\">no_unnest<\/span> qb_name(sbq) *\/ b from t_small s );<\/code><\/pre>\n<pre><code>------------------------------------------------------------------------------\n| Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |\n------------------------------------------------------------------------------\n|   0 | SELECT STATEMENT   |         |       |       |  <span style=\"color: red;\">1979K<\/span>(100)|          |\n|*  1 |  FILTER            |         |       |       |            |          |\n|   2 |   TABLE ACCESS FULL| T_LARGE |  1000K|  9765K|   570   (2)| 00:00:01 |\n|*  3 |   TABLE ACCESS FULL| T_SMALL |     1 |     3 |     2   (0)| 00:00:01 |\n------------------------------------------------------------------------------\n\nPredicate Information (identified by operation id):\n---------------------------------------------------\n\n   1 - filter( IS NOT NULL)\n   3 - filter(\"B\"=:B1)<\/code><\/pre>\n<p>The subquery runs for every row returned by the main query <a href=\"https:\/\/blogs.oracle.com\/optimizer\/optimizer-transformations:-subquery-unnesting-part-1\">[2]<\/a>. The total cost, therefore, can be calculated as follows :<\/p>\n<p>Cost of acquiring data in the main query + Cardinality of result from the main query * Cost of single subquery execution = 570 + 10^6 * 2 = 2 * 10^6 <a href=\"https:\/\/www.apress.com\/gp\/book\/9781590596364\">[3]<\/a><\/p>\n<p>The subquery execution is performance killer.<\/p>\n<h1>FILTER with ORE<\/h1>\n<p>After adding an OR operand to the query A, optimizer, surprisingly, doesn&#8217;t unnest anymore, and generates a plan with FILTER.<\/p>\n<p><b>Query C (OR added to the query A)<\/b><\/p>\n<pre><code>select \/*+ qb_name(main) *\/ a from t_large l where id in \n  ( select \/*+ qb_name(sbq) *\/ b from t_small s ) \n  <span style=\"color: red;\">or a = 1<\/span> ;<\/code><\/pre>\n<pre><code>\n------------------------------------------------------------------------------\n| Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |\n------------------------------------------------------------------------------\n|   0 | SELECT STATEMENT   |         |       |       |   <span style=\"color: red;\">572<\/span> (100)|          |\n|*  1 |  FILTER            |         |       |       |            |          |\n|   2 |   TABLE ACCESS FULL| T_LARGE |  1000K|  9765K|   572   (3)| 00:00:01 |\n|*  3 |   TABLE ACCESS FULL| T_SMALL |     1 |     3 |     2   (0)| 00:00:01 |\n------------------------------------------------------------------------------\n\nPredicate Information (identified by operation id):\n---------------------------------------------------\n\n   1 - filter((\"A\"=1 OR  IS NOT NULL))\n   3 - filter(\"B\"=:B1)<\/code><\/pre>\n<p>The cost wrongly slumped from 1979K to 572, because the subquery execution isn&#8217;t factored in in the total cost anymore. Consequently, that cost is severely underestimated.<\/p>\n<h1>Indexing driving table<\/h1>\n<p>ORE was bypassed due to missing indexes on the driving table:<\/p>\n<pre><code>ORE: Bypassed for disjunct chain: No Index or Partition driver found<\/code><\/pre>\n<p>(&#8220;Disjunct chain&#8221; is a synonym for OR operands.)<\/p>\n<p>As we can see, the ORE decision isn&#8217;t entirely cost based &#8211; the optimizer rejects the transformation if the OR operands aren&#8217;t indexed.<\/p>\n<p>The &#8220;ORE: Bypassed&#8230;&#8221; message disappeared after creating the following index on t_large.a:<\/p>\n<pre><code>create index i_t_large_1 on t_large(a);<\/code><\/pre>\n<p>Yet the plan didn&#8217;t change. The index above is necessary but not sufficient.<\/p>\n<h1>Reducing ORE cost<\/h1>\n<p>Now I&#8217;m enforcing ORE with the hint.<\/p>\n<p><b>Query D (or_expand hint added to the Query C)<\/b><\/p>\n<pre><code>select \/*+ qb_name(main) <span style=\"color: red;\">or_expand<\/span>(@main) *\/ a from t_large l \n  where id in ( select \/*+ qb_name(sbq) *\/ b from t_small s ) \n  or a = 1 ;<\/code><\/pre>\n<pre><code>------------------------------------------------------------------------------------------\n| Id  | Operation              | Name            | Rows  | Bytes | Cost (%CPU)| Time     |\n------------------------------------------------------------------------------------------\n|   0 | SELECT STATEMENT       |                 |       |       |   581 (100)|          |\n|   1 |  VIEW                  | VW_ORE_48C33071 |     3 |    39 |   <span style=\"color: red;\">581<\/span>   (3)| 00:00:01 |\n|   2 |   UNION-ALL            |                 |       |       |            |          |\n|*  3 |    INDEX RANGE SCAN    | I_T_LARGE_1     |     1 |     5 |     3   (0)| 00:00:01 |\n|*  4 |    HASH JOIN RIGHT SEMI|                 |     2 |    46 |   578   (3)| 00:00:01 |\n|   5 |     VIEW               | VW_NSO_1        |     2 |    26 |     2   (0)| 00:00:01 |\n|   6 |      TABLE ACCESS FULL | T_SMALL         |     2 |     6 |     2   (0)| 00:00:01 |\n|*  7 |     TABLE ACCESS FULL  | T_LARGE         |   999K|  9765K|   571   (2)| 00:00:01 |\n------------------------------------------------------------------------------------------\n\nPredicate Information (identified by operation id):\n---------------------------------------------------\n\n   3 - access(\"A\"=1)\n   4 - access(\"ID\"=\"B\")\n   7 - filter(LNNVL(\"A\"=1))<\/code><\/pre>\n<p>The ORE cost is slightly higher than the miscalculated FILTER cost, so we have to reduce it. The following index eliminates the expensive full table scan on t_large:<\/p>\n<pre><code>create index i_t_large_2 on t_large(id)<\/code><\/pre>\n<p>The plan for the query D (with or_expand hint) indeed became much more efficient:<\/p>\n<pre><code>--------------------------------------------------------------------------------------------------\n| Id  | Operation                      | Name            | Rows  | Bytes | Cost (%CPU)| Time     |\n--------------------------------------------------------------------------------------------------\n|   0 | SELECT STATEMENT               |                 |       |       |    12 (100)|          |\n|   1 |  VIEW                          | VW_ORE_48C33071 |     3 |    39 |    <span style=\"color: green;\">12<\/span>   (9)| 00:00:01 |\n|   2 |   UNION-ALL                    |                 |       |       |            |          |\n|*  3 |    INDEX RANGE SCAN            | I_T_LARGE_1     |     1 |     5 |     3   (0)| 00:00:01 |\n|   4 |    NESTED LOOPS                |                 |     2 |    46 |     9  (12)| 00:00:01 |\n|   5 |     NESTED LOOPS               |                 |     2 |    46 |     9  (12)| 00:00:01 |\n|   6 |      VIEW                      | VW_NSO_1        |     2 |    26 |     2   (0)| 00:00:01 |\n|   7 |       HASH UNIQUE              |                 |     2 |     6 |            |          |\n|   8 |        TABLE ACCESS FULL       | T_SMALL         |     2 |     6 |     2   (0)| 00:00:01 |\n|*  9 |      INDEX RANGE SCAN          | I_T_LARGE_2     |     1 |       |     2   (0)| 00:00:01 |\n|* 10 |     TABLE ACCESS BY INDEX ROWID| T_LARGE         |     1 |    10 |     3   (0)| 00:00:01 |\n--------------------------------------------------------------------------------------------------\n\nPredicate Information (identified by operation id):\n---------------------------------------------------\n\n3 - access(\"A\"=1)\n9 - access(\"ID\"=\"B\")\n10 - filter(LNNVL(\"A\"=1))<\/code><\/pre>\n<p>That&#8217;s clearly a better plan, but optimizer rejects it. But, why?<\/p>\n<h1>Unique constraint on the table in the subquery<\/h1>\n<p>The reason is recorded in the trace file:<\/p>\n<pre><code>ORE: Checking validity of OR Expansion for query block SBQ (#2)\nORE: Predicate chain before QB validity check - SBQ\n:B1=\"S\".\"B\"\nORE: Predicate chain after QB validity check - SBQ\n:B1=\"S\".\"B\"\nORE: bypassed - No valid predicate for OR expansion.<\/code><\/pre>\n<p>&#8220;No valid predicate for OR expansion&#8221;, wrote optimizer. &#8220;Which predicate isn&#8217;t valid; and why?&#8221;, I wondered.<\/p>\n<p>Just couple of lines above&#8230;<\/p>\n<pre><code>ORE: applying simple unnesting on interleaved qb.\nSU:   Transform an ANY subquery to <span style=\"color: red;\">semi-join<\/span> or distinct.\nRegistered qb: SEL$397D8923 0x8485cfb0 (SUBQ INTO VIEW FOR COMPLEX UNNEST SEL$7DA70B07)<\/code><\/pre>\n<p>The subquery was converted to semi-join (as opposed to join), because the correlated column in the subquery isn&#8217;t unique.<\/p>\n<p>Will ORE work with a unique constraint?<\/p>\n<pre><code>create unique index i_t_small_1 on t_small(b);<\/code><\/pre>\n<p>It will!<\/p>\n<pre><code>--------------------------------------------------------------------------------------------------\n| Id  | Operation                      | Name            | Rows  | Bytes | Cost (%CPU)| Time     |\n--------------------------------------------------------------------------------------------------\n|   0 | SELECT STATEMENT               |                 |       |       |     9 (100)|          |\n|   1 |  VIEW                          | VW_ORE_48C33071 |     3 |    39 |     <span style=\"color: red;\">9<\/span>   (0)| 00:00:01 |\n|   2 |   UNION-ALL                    |                 |       |       |            |          |\n|*  3 |    INDEX RANGE SCAN            | I_T_LARGE_1     |     1 |     5 |     3   (0)| 00:00:01 |\n|   4 |    NESTED LOOPS                |                 |     2 |    26 |     6   (0)| 00:00:01 |\n|   5 |     NESTED LOOPS               |                 |     2 |    26 |     6   (0)| 00:00:01 |\n|   6 |      INDEX FULL SCAN           | I_T_SMALL_1     |     2 |     6 |     1   (0)| 00:00:01 |\n|*  7 |      INDEX RANGE SCAN          | I_T_LARGE_2     |     1 |       |     2   (0)| 00:00:01 |\n|*  8 |     TABLE ACCESS BY INDEX ROWID| T_LARGE         |     1 |    10 |     3   (0)| 00:00:01 |\n--------------------------------------------------------------------------------------------------\n\nPredicate Information (identified by operation id):\n---------------------------------------------------\n\n   3 - access(\"A\"=1)\n   7 - access(\"ID\"=\"B\")\n   8 - filter(LNNVL(\"A\"=1))<\/code><\/pre>\n<h1>Summary<\/h1>\n<p>Cost based ORE of disjunctive subqueries is a huge improvement in 19c. But the decision isn&#8217;t entirely cost based. The optimizer has heuristics which can unnecessarily rule out a good plan.<\/p>\n<p>I discovered the following requirements:<\/p>\n<ul>\n<li>The uncorrelated OR operands must be indexed.<\/li>\n<li>The correlated column in the subquery must be unique.<\/li>\n<\/ul>\n<p>&#8220;ORE: bypass&#8221; and &#8220;ORE: Bypass&#8221; trace entries indicate that optimizer didn&#8217;t consider the transformation.<\/p>\n<p>Miscalculated FILTER cost is another reason for rejecting ORE. In addition, underestimated FILTER cost pervades all the parent operations, which can cause havoc in larger execution plans.<\/p>\n<p>What can you do?<\/p>\n<p>Reduce ORE cost as a workaround for the FILTER costing bug. If that doesn&#8217;t help, enforce ORE with the or_expand hint.<\/p>\n<h1>References<\/h1>\n<p><a href=\"https:\/\/jonathanlewis.wordpress.com\/2020\/08\/19\/subquery-with-or-3\/\">[1]<\/a> Jonathan Lewis, <i>Subquery with OR.<\/i> August 20, 2020.<\/p>\n<p><a href=\"https:\/\/blogs.oracle.com\/optimizer\/optimizer-transformations:-subquery-unnesting-part-1\">[2]<\/a> Maria Colgan, <i>Optimizer Transformations: Subquery Unnesting part 1.<\/i> September 15, 2010.<\/p>\n<p><a href=\"https:\/\/www.apress.com\/gp\/book\/9781590596364\">[3]<\/a> Jonathan Lewis, <i>Cost-Based Oracle Fundamentals.<\/i> 2006.<\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to overcome the limitations of expansion of OR-subqueries in Oracle 19c. <a href=\"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/\" class=\"more-link\">Continue Reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[36,11,33,5],"tags":[],"class_list":["post-3472","post","type-post","status-publish","format-standard","hentry","category-19c","category-cost-based-optimizer","category-or-expansion","category-oracle"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>OR-Expansion of Subqueries - Limitations - All-round Database Topics<\/title>\n<meta name=\"description\" content=\"How to overcome the limitations of expansion of OR-subqueries in Oracle 19c.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OR-Expansion of Subqueries - Limitations - All-round Database Topics\" \/>\n<meta property=\"og:description\" content=\"How to overcome the limitations of expansion of OR-subqueries in Oracle 19c.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/\" \/>\n<meta property=\"og:site_name\" content=\"All-round Database Topics\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-30T13:34:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-30T13:38:12+00:00\" \/>\n<meta name=\"author\" content=\"Nenad Noveljic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@NenadNoveljic\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nenad Noveljic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/or-expansion-of-subqueries-limitations\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/or-expansion-of-subqueries-limitations\\\/\"},\"author\":{\"name\":\"Nenad Noveljic\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#\\\/schema\\\/person\\\/51458d9dd86dbbdd19f5add451d44efa\"},\"headline\":\"OR-Expansion of Subqueries &#8211; Limitations\",\"datePublished\":\"2020-08-30T13:34:32+00:00\",\"dateModified\":\"2020-08-30T13:38:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/or-expansion-of-subqueries-limitations\\\/\"},\"wordCount\":581,\"commentCount\":0,\"articleSection\":[\"19c\",\"cost based optimizer\",\"OR-expansion\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/or-expansion-of-subqueries-limitations\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/or-expansion-of-subqueries-limitations\\\/\",\"url\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/or-expansion-of-subqueries-limitations\\\/\",\"name\":\"OR-Expansion of Subqueries - Limitations - All-round Database Topics\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#website\"},\"datePublished\":\"2020-08-30T13:34:32+00:00\",\"dateModified\":\"2020-08-30T13:38:12+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#\\\/schema\\\/person\\\/51458d9dd86dbbdd19f5add451d44efa\"},\"description\":\"How to overcome the limitations of expansion of OR-subqueries in Oracle 19c.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/or-expansion-of-subqueries-limitations\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/or-expansion-of-subqueries-limitations\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/or-expansion-of-subqueries-limitations\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OR-Expansion of Subqueries &#8211; Limitations\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/\",\"name\":\"All-round Database Topics\",\"description\":\"Nenad Noveljic\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/#\\\/schema\\\/person\\\/51458d9dd86dbbdd19f5add451d44efa\",\"name\":\"Nenad Noveljic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g\",\"caption\":\"Nenad Noveljic\"},\"sameAs\":[\"nenad-noveljic-9b746a6\",\"https:\\\/\\\/x.com\\\/NenadNoveljic\"],\"url\":\"https:\\\/\\\/nenadnoveljic.com\\\/blog\\\/author\\\/nenad\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OR-Expansion of Subqueries - Limitations - All-round Database Topics","description":"How to overcome the limitations of expansion of OR-subqueries in Oracle 19c.","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:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/","og_locale":"en_US","og_type":"article","og_title":"OR-Expansion of Subqueries - Limitations - All-round Database Topics","og_description":"How to overcome the limitations of expansion of OR-subqueries in Oracle 19c.","og_url":"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/","og_site_name":"All-round Database Topics","article_published_time":"2020-08-30T13:34:32+00:00","article_modified_time":"2020-08-30T13:38:12+00:00","author":"Nenad Noveljic","twitter_card":"summary_large_image","twitter_creator":"@NenadNoveljic","twitter_misc":{"Written by":"Nenad Noveljic","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/#article","isPartOf":{"@id":"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/"},"author":{"name":"Nenad Noveljic","@id":"https:\/\/nenadnoveljic.com\/blog\/#\/schema\/person\/51458d9dd86dbbdd19f5add451d44efa"},"headline":"OR-Expansion of Subqueries &#8211; Limitations","datePublished":"2020-08-30T13:34:32+00:00","dateModified":"2020-08-30T13:38:12+00:00","mainEntityOfPage":{"@id":"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/"},"wordCount":581,"commentCount":0,"articleSection":["19c","cost based optimizer","OR-expansion","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/","url":"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/","name":"OR-Expansion of Subqueries - Limitations - All-round Database Topics","isPartOf":{"@id":"https:\/\/nenadnoveljic.com\/blog\/#website"},"datePublished":"2020-08-30T13:34:32+00:00","dateModified":"2020-08-30T13:38:12+00:00","author":{"@id":"https:\/\/nenadnoveljic.com\/blog\/#\/schema\/person\/51458d9dd86dbbdd19f5add451d44efa"},"description":"How to overcome the limitations of expansion of OR-subqueries in Oracle 19c.","breadcrumb":{"@id":"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nenadnoveljic.com\/blog\/or-expansion-of-subqueries-limitations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nenadnoveljic.com\/blog\/"},{"@type":"ListItem","position":2,"name":"OR-Expansion of Subqueries &#8211; Limitations"}]},{"@type":"WebSite","@id":"https:\/\/nenadnoveljic.com\/blog\/#website","url":"https:\/\/nenadnoveljic.com\/blog\/","name":"All-round Database Topics","description":"Nenad Noveljic","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nenadnoveljic.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/nenadnoveljic.com\/blog\/#\/schema\/person\/51458d9dd86dbbdd19f5add451d44efa","name":"Nenad Noveljic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a97b796613ea48ec8a7b79c8ffe1c685dcffc920c68121f6238d5caab5070670?s=96&d=mm&r=g","caption":"Nenad Noveljic"},"sameAs":["nenad-noveljic-9b746a6","https:\/\/x.com\/NenadNoveljic"],"url":"https:\/\/nenadnoveljic.com\/blog\/author\/nenad\/"}]}},"_links":{"self":[{"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/posts\/3472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/comments?post=3472"}],"version-history":[{"count":1,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/posts\/3472\/revisions"}],"predecessor-version":[{"id":3492,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/posts\/3472\/revisions\/3492"}],"wp:attachment":[{"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/media?parent=3472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/categories?post=3472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nenadnoveljic.com\/blog\/wp-json\/wp\/v2\/tags?post=3472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}