<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Hints</title>
    <link>/en/sql-reference/language-elements/hints/</link>
    <description>Recent content in Hints on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/language-elements/hints/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: :c</title>
      <link>/en/sql-reference/language-elements/hints/c/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/c/</guid>
      <description>
        
        
        &lt;p&gt;In a directed query, marks a query constant that must be included in an input query; otherwise, that input query is disqualified from using the directed query.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/*+:c*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;
&lt;p&gt;By default, optimizer-generated directed queries set ignore constant (&lt;a href=&#34;../../../../en/sql-reference/language-elements/hints/v/&#34;&gt;&lt;code&gt;:v&lt;/code&gt;&lt;/a&gt;) hints on predicate constants. You can override this behavior by setting the &lt;code&gt;:c&lt;/code&gt; hint on input query constants that must not be ignored. For example, the following statement creates a directed query that can be used only for input queries where the join predicate constant is the same as in the original input query—&lt;code&gt;8&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE DIRECTED QUERY OPTIMIZER simpleJoin_KeepPredicateConstant SELECT * FROM S JOIN T ON S.a = T.b WHERE &lt;span class=&#34;code-input&#34;&gt;S.a = 8 /*+:c*/&lt;/span&gt;;
CREATE DIRECTED QUERY
=&amp;gt; ACTIVATE DIRECTED QUERY simpleJoin_KeepPredicateConstant;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/admin/managing-queries/directed-queries/ignoring-constants-directed-queries/#Conservi&#34;&gt;Conserving Predicate Constants in Directed Queries&lt;/a&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: :v</title>
      <link>/en/sql-reference/language-elements/hints/v/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/v/</guid>
      <description>
        
        
        &lt;p&gt;In a directed query, marks an input query constant that the optimizer ignores when it considers whether to use the directed query for a given query. Use this hint to create a directed query that can be used for multiple variants of an input query.&lt;/p&gt;
&lt;p&gt;OpenText™ Analytics Database also supports &lt;code&gt;IGNORECONST&lt;/code&gt; as an alias of &lt;code&gt;:v&lt;/code&gt; . Optimizer-generated directed queries automatically mark predicate constants in input and annotated queries with &lt;code&gt;:v&lt;/code&gt; hints.&lt;/p&gt;
&lt;p&gt;For details, see &lt;a href=&#34;../../../../en/admin/managing-queries/directed-queries/ignoring-constants-directed-queries/#&#34;&gt;Ignoring constants in directed queries&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/*+:v(&lt;span class=&#34;code-variable&#34;&gt;arg&lt;/span&gt;)*/
/*+IGNORECONST(&lt;span class=&#34;code-variable&#34;&gt;arg&lt;/span&gt;)*/
&lt;/code&gt;&lt;/pre&gt;&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;arg&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Integer argument that is used in the directed query to pair each input query &lt;code&gt;:v&lt;/code&gt; hint with one or more annotated query &lt;code&gt;:v&lt;/code&gt; hints.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../../en/admin/managing-queries/directed-queries/ignoring-constants-directed-queries/#&#34;&gt;Ignoring constants in directed queries&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ALLNODES</title>
      <link>/en/sql-reference/language-elements/hints/allnodes/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/allnodes/</guid>
      <description>
        
        
        &lt;p&gt;Qualifies an 
&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/statements/explain/#&#34;&gt;EXPLAIN&lt;/a&gt;&lt;/code&gt; statement to request a query plan that assumes all nodes are active. If you omit this hint, the &lt;code&gt;EXPLAIN&lt;/code&gt; statement produces a query plan that takes into account any nodes that are currently down.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPLAIN /*+ALLNODES*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;In the following example, the &lt;code&gt;ALLNODES&lt;/code&gt; hint requests a query plan that assumes all nodes are active.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;QUERY PLAN DESCRIPTION:
 ------------------------------

 Opt Vertica Options
 --------------------
 PLAN_ALL_NODES_ACTIVE


 EXPLAIN /*+ALLNODES*/ select * from Emp_Dimension;

 Access Path:
 +-STORAGE ACCESS for Emp_Dimension [Cost: 125, Rows: 10K (NO STATISTICS)] (PATH ID: 1)
 |  Projection: public.Emp_Dimension_b0
 |  Materialize: Emp_Dimension.Employee_key, Emp_Dimension.Employee_gender, Emp_Dimension.Courtesy_title, Emp_Dimension.Employee_first_name, Emp_Dimension.Employee_middle_initial, Emp_Dimension.Employee_last_name, Emp_Dimension.Employee_age, Emp_Dimension.Employee_birthdate, Emp_Dimension.Employee_street, Emp_Dimension.Employee_city, Emp_Dimension.Employee_state, Emp_Dimension.Employee_region, Emp_Dimension.Employee_position
 |  Execute on: All Nodes
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: DEPOT_FETCH</title>
      <link>/en/sql-reference/language-elements/hints/depot-fetch/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/depot-fetch/</guid>
      <description>
        
        
        &lt;p&gt;Eon Mode only&lt;/p&gt;

&lt;p&gt;Specifies whether a query fetches data to the depot from communal storage when the depot lacks data for this query. This hint overrides configuration parameter &lt;a href=&#34;../../../../en/sql-reference/config-parameters/eon-parameters/&#34;&gt;DepotOperationsForQuery&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+DEPOT_FETCH (&lt;span class=&#34;code-variable&#34;&gt;option&lt;/span&gt;)*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;*&lt;/code&gt;option&lt;code&gt;*&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies behavior when the depot does not contain queried file data, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;ALL&lt;/code&gt; (default): Fetch file data from communal storage, if necessary displace existing files by evicting them from the depot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;FETCHES&lt;/code&gt;: Fetch file data from communal storage only if space is available; otherwise, read the queried data directly from communal storage.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;NONE&lt;/code&gt;: Do not fetch file data to the depot, read the queried data directly from communal storage.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+DEPOT_FETCH(All)*/ count(*) FROM bar;
SELECT /*+DEPOT_FETCH(FETCHES)*/ count(*) FROM bar;
SELECT /*+DEPOT_FETCH(NONE)*/ count(*) FROM bar;
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: DISTRIB</title>
      <link>/en/sql-reference/language-elements/hints/distrib/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/distrib/</guid>
      <description>
        
        
        &lt;p&gt;The DISTRIB hint specifies to the optimizer how to distribute join key data in order to implement a join. If a specified distribution is not feasible, the optimizer ignores the hint and throws a warning.&lt;/p&gt;
&lt;p&gt;The following requirements apply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Queries that include the DISTRIB hint must also include the SYNTACTIC_JOIN hint. Otherwise, the optimizer ignores the DISTRIB hint and throws a warning.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Join syntax must conform with ANSI SQL-92 join conventions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;JOIN /*+DISTRIB(&lt;span class=&#34;code-variable&#34;&gt;outer-join, inner-join&lt;/span&gt;)*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class=&#34;code-variable&#34;&gt;outer-join&lt;br /&gt;inner-join&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies how to distribute data on the outer and inner joins:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;L&lt;/code&gt; (local): Inner and outer join keys are identically segmented on each node, join locally.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;R&lt;/code&gt; (resegment): Inner and outer join keys are not identically segmented. Resegment join-key data before implementing the join.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;B&lt;/code&gt; (broadcast): Inner and outer join keys are not identically segmented. Broadcast data of this join key to other nodes before implementing the join.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;F&lt;/code&gt; (filter): Join table is unsegmented. Filter data as needed by the other join key before implementing the join.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;A&lt;/code&gt; (any): Let the optimizer choose the distribution method that it considers to be most cost-effective.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;In the following query, the join is qualified with a &lt;code&gt;DISTRIB&lt;/code&gt; hint of &lt;code&gt;/*+DISTRIB(L,R)*/&lt;/code&gt;. This hint tells the optimizer to resegment data of join key &lt;code&gt;stores.store_key&lt;/code&gt; before joining it to the &lt;code&gt;sales.store_key&lt;/code&gt; data:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+SYNTACTIC_JOIN*/ sales.store_key, stores.store_name, sales.product_description, sales.sales_quantity, sales.sale_date
FROM (store.storeSales AS sales JOIN /*+DISTRIB(L,R),JTYPE(H)*/ store.store_dimension AS stores ON (sales.store_key = stores.store_key))
WHERE (sales.sale_date = &amp;#39;2014-12-01&amp;#39;::date) ORDER BY sales.store_key, sales.sale_date;
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: EARLY_MATERIALIZATION</title>
      <link>/en/sql-reference/language-elements/hints/early-materialization/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/early-materialization/</guid>
      <description>
        
        
        &lt;p&gt;Specifies early materialization of a table for the current query. A query can include this hint for any number of tables. Typically, the query optimizer delays materialization until late in the query execution process. This hint overrides any choices that the optimizer otherwise would make.&lt;/p&gt;
&lt;p&gt;This hint can be useful in cases where late materialization of join inputs precludes other optimizations—for example, pushing aggregation down the joins, or using live aggregate projections. In these cases, qualifying a join input with &lt;code&gt;EARLY_MATERIALIZATION&lt;/code&gt; can enable the optimizations.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;table-name&lt;/span&gt; [ [AS] &lt;span class=&#34;code-variable&#34;&gt;alias&lt;/span&gt; ] /*+EARLY_MATERIALIZATION*/
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ECSMODE</title>
      <link>/en/sql-reference/language-elements/hints/ecsmode/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/ecsmode/</guid>
      <description>
        
        
        &lt;p&gt;Eon Mode only&lt;/p&gt;

&lt;p&gt;Sets the &lt;a href=&#34;../../../../en/eon/scaling-your-eon-db/manually-choosing-an-ecs-strategy/&#34;&gt;ECS strategy&lt;/a&gt; that the optimizer uses when it divides responsibility for processing shard data among subscriber nodes. This hint is applied only if the subcluster uses &lt;a href=&#34;../../../../en/eon/scaling-your-eon-db/using-elastic-crunch-scaling-to-improve-query-performance/&#34;&gt;elastic crunch scaling&lt;/a&gt; (ECS).&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+ECSMODE(&lt;span class=&#34;code-variable&#34;&gt;option&lt;/span&gt;)*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;*&lt;/code&gt;option&lt;code&gt;*&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the strategy to use when dividing shard data among its subscribing nodes, one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;AUTO&lt;/code&gt;: The optimizer chooses the strategy to use, useful only if ECS mode is set at the session level (see &lt;a href=&#34;../../../../en/eon/scaling-your-eon-db/manually-choosing-an-ecs-strategy/#Setting&#34;&gt;Setting the ECS Strategy for the Session or Database&lt;/a&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;IO_OPTIMIZED&lt;/code&gt;: Use I/O-optimized strategy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;COMPUTE_OPTIMIZED&lt;/code&gt;: Use compute-optimized strategy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;NONE&lt;/code&gt;: Disable use of ECS for this query. Only participating nodes are involved in query execution; collaborating nodes are not.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example shows the query plan for a simple single-table query that is forced to use the compute-optimized strategy:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; EXPLAIN SELECT /*+ECSMode(COMPUTE_OPTIMIZED)*/ employee_last_name,
             employee_first_name,employee_age
             FROM employee_dimension
             ORDER BY employee_age DESC;

                                   QUERY PLAN
--------------------------------------------------------------------------------
 ------------------------------
 QUERY PLAN DESCRIPTION:
 The execution of this query involves non-participating nodes.
 Crunch scaling strategy preserves data segmentation
 ------------------------------
. . .
&lt;/code&gt;&lt;/pre&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ENABLE_WITH_CLAUSE_MATERIALIZATION</title>
      <link>/en/sql-reference/language-elements/hints/enable-with-clause-materialization/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/enable-with-clause-materialization/</guid>
      <description>
        
        
        Enables materialization of all queries in the current WITH clause. Otherwise, materialization is set by configuration parameter WithClauseMaterialization, by default set to 0 (disabled). If WithClauseMaterialization is disabled, materialization is automatically cleared when the primary query of the WITH clause returns. For details, see &lt;a href=&#34;../../../../en/sql-reference/statements/select/with-clause/materialization-of-with-clause/#&#34;&gt;Materialization of WITH clause&lt;/a&gt;.
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;WITH /*+ENABLE_WITH_CLAUSE_MATERIALIZATION*/
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: GBYTYPE</title>
      <link>/en/sql-reference/language-elements/hints/gbytype/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/gbytype/</guid>
      <description>
        
        
        &lt;p&gt;Specifies which algorithm—GROUPBY HASH or GROUPBY PIPELINED —the query optimizer should use to implement a &lt;a href=&#34;../../../../en/sql-reference/statements/select/group-by-clause/&#34;&gt;GROUP BY&lt;/a&gt; clause. If both algorithms are valid for this query, the query optimizer chooses the specified algorithm over the algorithm that the query optimizer might otherwise choose in its query plan.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

OpenText™ Analytics Database uses the GROUPBY PIPELINED algorithm only if the query and one of its projections comply with GROUPBY PIPELINED &lt;a href=&#34;../../../../en/data-analysis/query-optimization/group-by-queries/group-by-implementation-options/#GROUPBY&#34;&gt;requirements&lt;/a&gt;. Otherwise, the database issues a warning and uses GROUPBY HASH.

&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;For more information about both algorithms, see &lt;a href=&#34;../../../../en/data-analysis/query-optimization/group-by-queries/group-by-implementation-options/#&#34;&gt;GROUP BY implementation options&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;GROUP BY /*+GBYTYPE( HASH | PIPE )*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;HASH&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Use the GROUPBY HASH algorithm.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;PIPE&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Use the GROUPBY PIPELINED algorithm.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../../en/data-analysis/query-optimization/group-by-queries/group-by-implementation-options/#Controll&#34;&gt;Controlling GROUPBY Algorithm Choice&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: JFMT</title>
      <link>/en/sql-reference/language-elements/hints/jfmt/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/jfmt/</guid>
      <description>
        
        
        &lt;p&gt;Specifies how to size VARCHAR column data when joining tables on those columns, and buffer that data accordingly. The JFMT hint overrides the default behavior that is set by configuration parameter &lt;a href=&#34;../../../../en/sql-reference/config-parameters/general-parameters/&#34;&gt;JoinDefaultTupleFormat&lt;/a&gt;, which can be set at database and session levels.&lt;/p&gt;
&lt;p&gt;For more information, see &lt;a href=&#34;../../../../en/data-analysis/query-optimization/join-queries/joining-variable-length-string-data/#&#34;&gt;Joining variable length string data&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;JOIN /*+JFMT(&lt;span class=&#34;code-variable&#34;&gt;format-type&lt;/span&gt;)*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;format-type&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies how to format VARCHAR column data when joining tables on those columns, and buffers the data accordingly. Set to one of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;f&lt;/code&gt; (fixed): Use join column metadata to size column data to a fixed length, and buffer accordingly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;v&lt;/code&gt; (variable): Use the actual length of join column data, so buffer size varies for each join.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+SYNTACTIC_JOIN*/ s.store_region, SUM(e.vacation_days) TotalVacationDays
   FROM public.employee_dimension e
   JOIN /*+JFMT(f)*/ store.store_dimension s ON s.store_region=e.employee_region
   GROUP BY s.store_region ORDER BY TotalVacationDays;
&lt;/code&gt;&lt;/pre&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Queries that include the &lt;code&gt;JFMT&lt;/code&gt; hint must also include the &lt;code&gt;SYNTACTIC_JOIN&lt;/code&gt; hint. Otherwise, the optimizer ignores the &lt;code&gt;JFMT&lt;/code&gt; hint and throws a warning.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Join syntax must conform with ANSI SQL-92 join conventions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: JTYPE</title>
      <link>/en/sql-reference/language-elements/hints/jtype/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/jtype/</guid>
      <description>
        
        
        &lt;p&gt;Specifies the join algorithm as hash or merge.&lt;/p&gt;
&lt;p&gt;Use the JTYPE hint to specify the algorithm the optimizer uses to join table data. If the specified algorithm is not feasible, the optimizer ignores the hint and throws a warning.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;JOIN /*+JTYPE(&lt;span class=&#34;code-variable&#34;&gt;join-type&lt;/span&gt;)*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;join-type&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;One of the following:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;H&lt;/code&gt;: Hash join&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;M&lt;/code&gt;: Merge join, valid only if both join inputs are already sorted on the join columns, otherwise OpenText™ Analytics Database ignores it and throws a warning. The optimizer relies upon the query or DDL to verify whether input data is sorted, rather than the actual runtime order of the data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;FM&lt;/code&gt;: Forced merge join. Before performing the merge, the optimizer re-sorts the join inputs. Join columns must be of the same type and precision or scale, except that string columns can have different lengths.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A value of &lt;code&gt;FM&lt;/code&gt; is valid only for simple join conditions. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT /*+SYNTACTIC_JOIN*/ * FROM x JOIN /*+JTYPE(FM)*/ y ON x.c1 = y.c1;
&lt;/code&gt;&lt;/pre&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Queries that include the JTYPE hint must also include the SYNTACTIC_JOIN hint. Otherwise, the optimizer ignores the JTYPE hint and throws a warning.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Join syntax must conform with ANSI SQL-92 join conventions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: LABEL</title>
      <link>/en/sql-reference/language-elements/hints/label/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/label/</guid>
      <description>
        
        
        &lt;p&gt;Assigns a label to a statement so it can &lt;a href=&#34;../../../../en/admin/profiling-db-performance/labeling-statements/&#34;&gt;easily be identified&lt;/a&gt; to evaluate performance and debug problems.&lt;/p&gt;
&lt;p&gt;LABEL hints are valid in the following statements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/copy/#&#34;&gt;COPY&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/delete/#&#34;&gt;DELETE&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EXPORT statements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/export-to-delimited/#&#34;&gt;EXPORT TO DELIMITED&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/export-to-orc/#&#34;&gt;EXPORT TO ORC&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/export-to-parquet/#&#34;&gt;EXPORT TO PARQUET&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/export-to/#&#34;&gt;EXPORT TO VERTICA&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/insert/#&#34;&gt;INSERT&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/merge/#&#34;&gt;MERGE&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/update/#&#34;&gt;UPDATE&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/statements/select/union-clause/&#34;&gt;UNION&lt;/a&gt;: Valid in the UNION&#39;s first SELECT statement. Vertica ignores labels in subsequent SELECT statements.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;statement-name &lt;/span&gt;/*+LABEL (&lt;span class=&#34;code-variable&#34;&gt;label-string&lt;/span&gt;)*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;label-string&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A string that is up to 128 octets long. If enclosed with single quotes, &lt;em&gt;&lt;code&gt;label-string&lt;/code&gt;&lt;/em&gt; can contain embedded spaces.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;../../../../en/admin/profiling-db-performance/labeling-statements/#&#34;&gt;Labeling statements&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: PROJS</title>
      <link>/en/sql-reference/language-elements/hints/projs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/projs/</guid>
      <description>
        
        
        &lt;p&gt;Specifies one or more projections to use for a queried table.&lt;/p&gt;
&lt;p&gt;The PROJS hint can specify multiple projections; the optimizer determines which ones are valid and uses the one that is most cost-effective for the queried table. If no hinted projection is valid, the query returns a warning and ignores projection hints.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;FROM `*`table-name`*` /*+PROJS( [[`*`database`*`.]`*`schema.`*`]`*`projection`*`[,...] )*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;[&lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.]&lt;/code&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Database and &lt;a href=&#34;../../../../en/admin/configuring-db/designing-logical-schema/using-multiple-schemas/setting-search-paths/&#34;&gt;schema&lt;/a&gt;. The default schema is &lt;code&gt;public&lt;/code&gt;. If you specify a database, it must be the current database.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;projection&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The projection to use. You can specify a list of comma-delimited projections.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;employee_dimension&lt;/code&gt; table has two projections: segmented superprojection &lt;code&gt;public.employee_dimension&lt;/code&gt;, which includes all table columns; and the unsegmented projection &lt;code&gt;public.employee_dimension_rep&lt;/code&gt;, which includes a subset of the columns:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT export_objects(&amp;#39;&amp;#39;,&amp;#39;employee_dimension&amp;#39;);
                                                      export_objects
--------------------------------------------------------------------------------------------------------------------------

CREATE TABLE public.employee_dimension
(
    employee_key int NOT NULL,
    employee_gender varchar(8),
    courtesy_title varchar(8),
    employee_first_name varchar(64),
    employee_middle_initial varchar(8),
    employee_last_name varchar(64),
    employee_age int,
    hire_date date,
    employee_street_address varchar(256),
    employee_city varchar(64),
    employee_state char(2),
    employee_region char(32),
    job_title varchar(64),
    reports_to int,
    salaried_flag int,
    annual_salary int,
    hourly_rate float,
    vacation_days int,
    CONSTRAINT C_PRIMARY PRIMARY KEY (employee_key) DISABLED
);

CREATE PROJECTION public.employee_dimension
...
AS
 SELECT employee_dimension.employee_key,
        employee_dimension.employee_gender,
        employee_dimension.courtesy_title,
        employee_dimension.employee_first_name,
        employee_dimension.employee_middle_initial,
        employee_dimension.employee_last_name,
        employee_dimension.employee_age,
        employee_dimension.hire_date,
        employee_dimension.employee_street_address,
        employee_dimension.employee_city,
        employee_dimension.employee_state,
        employee_dimension.employee_region,
        employee_dimension.job_title,
        employee_dimension.reports_to,
        employee_dimension.salaried_flag,
        employee_dimension.annual_salary,
        employee_dimension.hourly_rate,
        employee_dimension.vacation_days
 FROM public.employee_dimension
 ORDER BY employee_dimension.employee_key
SEGMENTED BY hash(employee_dimension.employee_key) ALL NODES KSAFE 1;

CREATE PROJECTION public.employee_dimension_rep
...
AS
 SELECT employee_dimension.employee_key,
        employee_dimension.employee_gender,
        employee_dimension.employee_first_name,
        employee_dimension.employee_middle_initial,
        employee_dimension.employee_last_name,
        employee_dimension.employee_age,
        employee_dimension.employee_street_address,
        employee_dimension.employee_city,
        employee_dimension.employee_state,
        employee_dimension.employee_region
 FROM public.employee_dimension
 ORDER BY employee_dimension.employee_key
UNSEGMENTED ALL NODES;

SELECT MARK_DESIGN_KSAFE(1);

(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following query selects all table columns from &lt;code&gt;employee_dimension&lt;/code&gt; and includes the PROJS hint, which specifies both projections. &lt;code&gt;public.employee_dimension_rep&lt;/code&gt; does not include all columns in the queried table, so the optimizer cannot use it. The segmented projection includes all table columns so the optimizer uses it, as verified by the following query plan:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; EXPLAIN SELECT * FROM employee_dimension /*+PROJS(&amp;#39;&lt;span class=&#34;code-input&#34;&gt;public.employee_dimension_rep&lt;/span&gt;&amp;#39;, &amp;#39;&lt;span class=&#34;code-input&#34;&gt;public.employee_dimension&lt;/span&gt;&amp;#39;)*/;

QUERY PLAN DESCRIPTION:
------------------------------
EXPLAIN SELECT * FROM employee_dimension /*+PROJS(&amp;#39;public.employee_dimension_rep&amp;#39;, &amp;#39;public.employee_dimension&amp;#39;)*/;

 Access Path:
 +-STORAGE ACCESS for employee_dimension [Cost: 177, Rows: 10K (NO STATISTICS)] (PATH ID: 1)
 |  Projection: &lt;span class=&#34;code-input&#34;&gt;public.employee_dimension_b0
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SKIP_PROJS</title>
      <link>/en/sql-reference/language-elements/hints/skip-projs/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/skip-projs/</guid>
      <description>
        
        
        &lt;p&gt;Specifies which projections to avoid using for a queried table. If &lt;code&gt;SKIP_PROJS&lt;/code&gt; excludes all available projections that are valid for the query, the optimizer issues a warning and ignores the projection hints.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;FROM &lt;span class=&#34;code-variable&#34;&gt;table-name&lt;/span&gt; /*+SKIP_PROJS( [[&lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;schema.&lt;/span&gt;]&lt;span class=&#34;code-variable&#34;&gt;projection&lt;/span&gt;[,...] )*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;[&lt;/code&gt;&lt;em&gt;&lt;code&gt;database.&lt;/code&gt;&lt;/em&gt;&lt;code&gt;]&lt;/code&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Database and &lt;a href=&#34;../../../../en/admin/configuring-db/designing-logical-schema/using-multiple-schemas/setting-search-paths/&#34;&gt;schema&lt;/a&gt;. The default schema is &lt;code&gt;public&lt;/code&gt;. If you specify a database, it must be the current database.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;projection&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A projection to skip. You can specify a list of comma-delimited projections.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;In this example, the EXPLAIN output shows that the optimizer uses the projection &lt;code&gt;public.employee_dimension_b0&lt;/code&gt; for a given query:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
QUERY PLAN DESCRIPTION:
------------------------------

 EXPLAIN SELECT employee_last_name, employee_first_name, employee_city, job_title FROM employee_dimension;

 Access Path:
 +-STORAGE ACCESS for employee_dimension [Cost: 59, Rows: 10K (NO STATISTICS)] (PATH ID: 1)
 |  &lt;span class=&#34;code-input&#34;&gt;Projection: public.employee_dimension_b0&lt;/span&gt;
 |  Materialize: employee_dimension.employee_first_name, employee_dimension.employee_last_name, employee_dimension.employee_city, employee_dimension.job_title
 |  Execute on: All Nodes
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can use the &lt;code&gt;SKIP_PROJS&lt;/code&gt; hint to avoid using this projection. If another projection is available that is valid for this query, the optimizer uses it instead:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
QUERY PLAN DESCRIPTION:
------------------------------

EXPLAIN SELECT employee_last_name, employee_first_name, employee_city, job_title FROM employee_dimension /*+SKIP_PROJS(&amp;#39;public.employee_dimension&amp;#39;)*/;

 Access Path:
 +-STORAGE ACCESS for employee_dimension [Cost: 156, Rows: 10K (NO STATISTICS)] (PATH ID: 1)
 |  &lt;span class=&#34;code-input&#34;&gt;Projection: public.employee_dimension_super&lt;/span&gt;
 |  Materialize: employee_dimension.employee_first_name, employee_dimension.employee_last_name, employee_dimension.emplo
yee_city, employee_dimension.job_title
 |  Execute on: Query Initiator
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SKIP_STATISTICS</title>
      <link>/en/sql-reference/language-elements/hints/skip-statistics/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/skip-statistics/</guid>
      <description>
        
        
        &lt;p&gt;Directs the optimizer to produce a query plan that incorporates only the minimal statistics that are collected by 
&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/storage-functions/do-tm-task/#&#34;&gt;ANALYZE_ROW_COUNT&lt;/a&gt;&lt;/code&gt;. The optimizer ignores other statistics that would otherwise be used, that are generated by 
&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/performance-analysis-functions/statistics-management-functions/analyze-statistics/#&#34;&gt;ANALYZE_STATISTICS&lt;/a&gt;&lt;/code&gt; and 
&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/performance-analysis-functions/statistics-management-functions/analyze-statistics-partition/#&#34;&gt;ANALYZE_STATISTICS_PARTITION&lt;/a&gt;&lt;/code&gt;. This hint is especially useful when used in queries on small tables, where the amount of time required to collect full statistics is often greater than actual execution time.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+SKIP_STAT[ISTIC]S*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;explain-output&#34;&gt;EXPLAIN output&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;EXPLAIN&lt;/code&gt; returns the following output for a query that includes &lt;code&gt;SKIP_STATISTICS&lt;/code&gt; (using its shortened form &lt;code&gt;SKIP_STATS&lt;/code&gt;):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; EXPLAIN SELECT /*+ SKIP_STATS*/ customer_key, customer_name, customer_gender, customer_city||&amp;#39;, &amp;#39;||customer_state, customer_age
    FROM customer_dimension WHERE customer_region = &amp;#39;East&amp;#39; AND customer_age &amp;gt; 60;

 QUERY PLAN DESCRIPTION:
 ------------------------------

 EXPLAIN SELECT /*+ SKIP_STATS*/ customer_key, customer_name, customer_gender, customer_city||&amp;#39;, &amp;#39;||customer_state,
 customer_age FROM customer_dimension WHERE customer_region = &amp;#39;East&amp;#39; AND customer_age &amp;gt; 60;

 Access Path:
 +-STORAGE ACCESS for customer_dimension [Cost: 2K, Rows: 10K (STATISTICS SKIPPED)] (PATH ID: 1)
 |  Projection: public.customer_dimension_b0
 |  Materialize: public.customer_dimension.customer_age, public.customer_dimension.customer_key, public.customer_dimensi
on.customer_name, public.customer_dimension.customer_gender, public.customer_dimension.customer_city, public.customer_di
mension.customer_state
 |  Filter: (public.customer_dimension.customer_region = &amp;#39;East&amp;#39;)
 |  Filter: (public.customer_dimension.customer_age &amp;gt; 60)
 |  Execute on: All Nodes
...
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SYNTACTIC_JOIN</title>
      <link>/en/sql-reference/language-elements/hints/syntactic-join/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/syntactic-join/</guid>
      <description>
        
        
        &lt;p&gt;Enforces join order and enables other join hints.&lt;/p&gt;
&lt;p&gt;In order to achieve optimal performance, the optimizer often overrides a query&#39;s specified join order. By including the &lt;code&gt;SYNTACTIC_JOIN&lt;/code&gt; hint, you can ensure that the optimizer enforces the query&#39;s join order exactly as specified. One requirement applies: the join syntax must conform with ANSI SQL-92 conventions.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;SYNTACTIC_JOIN&lt;/code&gt; hint must immediately follow &lt;code&gt;SELECT&lt;/code&gt;. If the annotated query includes another hint that must also follow &lt;code&gt;SELECT&lt;/code&gt;, such as &lt;code&gt;VERBATIM&lt;/code&gt;, combine the two hints together. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+ syntactic_join,verbatim*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+SYN[TACTIC]_JOIN*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;In the following examples, the optimizer produces different plans for two queries that differ only by including or excluding the &lt;code&gt;SYNTACTIC_JOIN&lt;/code&gt; hint.&lt;/p&gt;
&lt;p&gt;Excludes SYNTACTIC_JOIN:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPLAIN SELECT sales.store_key, stores.store_name, products.product_description, sales.sales_quantity, sales.sale_date
FROM (store.store_sales sales JOIN products ON sales.product_key=products.product_key)
JOIN store.store_dimension stores ON sales.store_key=stores.store_key
WHERE sales.sale_date=&amp;#39;2014-12-01&amp;#39; order by sales.store_key, sales.sale_date;

 Access Path:
 +-SORT [Cost: 14K, Rows: 100K (NO STATISTICS)] (PATH ID: 1)
 |  Order: sales.store_key ASC, sales.sale_date ASC
 |  Execute on: All Nodes
 | +---&amp;gt; JOIN HASH [Cost: 11K, Rows: 100K (NO STATISTICS)] (PATH ID: 2) Outer (RESEGMENT)(LOCAL ROUND ROBIN) Inner (RESEGMENT)
 | |      Join Cond: (sales.product_key = products.product_key)
 | |      Materialize at Input: sales.store_key, sales.product_key, sales.sale_date, sales.sales_quantity
 | |      Execute on: All Nodes
 | | +-- Outer -&amp;gt; JOIN HASH [Cost: 1K, Rows: 100K (NO STATISTICS)] (PATH ID: 3)
 | | |      Join Cond: (sales.store_key = stores.store_key)
 | | |      Execute on: All Nodes
 | | | +-- Outer -&amp;gt; STORAGE ACCESS for sales [Cost: 1K, Rows: 100K (NO STATISTICS)] (PATH ID: 4)
 | | | |      Projection: store.store_sales_b0
 | | | |      Materialize: sales.store_key
 | | | |      Filter: (sales.sale_date = &amp;#39;2014-12-01&amp;#39;::date)
 | | | |      Execute on: All Nodes
 | | | |      Runtime Filter: (SIP1(HashJoin): sales.store_key)
 | | | +-- Inner -&amp;gt; STORAGE ACCESS for stores [Cost: 34, Rows: 250] (PATH ID: 5)
 | | | |      Projection: store.store_dimension_DBD_10_rep_VMartDesign_node0001
 | | | |      Materialize: stores.store_key, stores.store_name
 | | | |      Execute on: All Nodes
 | | +-- Inner -&amp;gt; STORAGE ACCESS for products [Cost: 3K, Rows: 60K (NO STATISTICS)] (PATH ID: 6)
 | | |      Projection: public.products_b0
 | | |      Materialize: products.product_key, products.product_description
 | | |      Execute on: All Nodes
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Includes SYNTACTIC_JOIN:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;EXPLAIN SELECT /*+SYNTACTIC_JOIN*/ sales.store_key, stores.store_name, products.product_description, sales.sales_quantity, sales.sale_date
FROM (store.store_sales sales JOIN products ON sales.product_key=products.product_key)
JOIN store.store_dimension stores ON sales.store_key=stores.store_key
WHERE sales.sale_date=&amp;#39;2014-12-01&amp;#39; order by sales.store_key, sales.sale_date;

 Access Path:
 +-SORT [Cost: 11K, Rows: 100K (NO STATISTICS)] (PATH ID: 1)
 |  Order: sales.store_key ASC, sales.sale_date ASC
 |  Execute on: All Nodes
 | +---&amp;gt; JOIN HASH [Cost: 8K, Rows: 100K (NO STATISTICS)] (PATH ID: 2)
 | |      Join Cond: (sales.store_key = stores.store_key)
 | |      Execute on: All Nodes
 | | +-- Outer -&amp;gt; JOIN HASH [Cost: 7K, Rows: 100K (NO STATISTICS)] (PATH ID: 3) Outer (BROADCAST)(LOCAL ROUND ROBIN)
 | | |      Join Cond: (sales.product_key = products.product_key)
 | | |      Execute on: All Nodes
 | | |      Runtime Filter: (SIP1(HashJoin): sales.store_key)
 | | | +-- Outer -&amp;gt; STORAGE ACCESS for sales [Cost: 2K, Rows: 100K (NO STATISTICS)] (PATH ID: 4)
 | | | |      Projection: store.store_sales_b0
 | | | |      Materialize: sales.sale_date, sales.store_key, sales.product_key, sales.sales_quantity
 | | | |      Filter: (sales.sale_date = &amp;#39;2014-12-01&amp;#39;::date)
 | | | |      Execute on: All Nodes
 | | | +-- Inner -&amp;gt; STORAGE ACCESS for products [Cost: 3K, Rows: 60K (NO STATISTICS)] (PATH ID: 5)
 | | | |      Projection: public.products_b0
 | | | |      Materialize: products.product_key, products.product_description
 | | | |      Execute on: All Nodes
 | | +-- Inner -&amp;gt; STORAGE ACCESS for stores [Cost: 34, Rows: 250] (PATH ID: 6)
 | | |      Projection: store.store_dimension_DBD_10_rep_VMartDesign_node0001
 | | |      Materialize: stores.store_key, stores.store_name
 | | |      Execute on: All Nodes
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: UTYPE</title>
      <link>/en/sql-reference/language-elements/hints/utype/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/utype/</guid>
      <description>
        
        
        &lt;p&gt;Specifies how to combine &lt;a href=&#34;../../../../en/sql-reference/statements/select/union-clause/&#34;&gt;UNION ALL&lt;/a&gt; input.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;UNION ALL /*+UTYPE(&lt;span class=&#34;code-variable&#34;&gt;union-type&lt;/span&gt;)*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;union-type&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;One of the following values:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;U&lt;/code&gt;: Concatenates &lt;code&gt;UNION ALL&lt;/code&gt; input (default).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;M&lt;/code&gt;: Merges &lt;code&gt;UNION ALL&lt;/code&gt; input in the same sort order as the source query results. This option requires all input from the source queries to use the same sort order; otherwise, OpenText™ Analytics Database displays a warning and concatenates the &lt;code&gt;UNION ALL&lt;/code&gt; input.&lt;/p&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The optimizer relies upon the query or DDL to verify whether input data is sorted, rather than the actual runtime order of the data.

&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;
&lt;p&gt;Queries that include the &lt;code&gt;UTYPE&lt;/code&gt; hint must also include the &lt;code&gt;SYNTACTIC_JOIN&lt;/code&gt; hint. Otherwise, the optimizer ignores the &lt;code&gt;UTYPE&lt;/code&gt; hint and throws a warning.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: VERBATIM</title>
      <link>/en/sql-reference/language-elements/hints/verbatim/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/hints/verbatim/</guid>
      <description>
        
        
        &lt;p&gt;Enforces execution of an annotated query exactly as written.&lt;/p&gt;
&lt;p&gt;VERBATIM directs the optimizer to create a query plan that incorporates all hints in a annotated query. Furthermore, it directs the optimizer not to apply its own plan development processing on query plan components that pertain to those hints.&lt;/p&gt;
&lt;p&gt;Usage of this hint varies between &lt;a href=&#34;#Optimizer&#34;&gt;optimizer-generated&lt;/a&gt; and &lt;a href=&#34;#Custom&#34;&gt;custom&lt;/a&gt; directed queries, as described below.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+ VERBATIM*/
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;
&lt;p&gt;The VERBATIM hint must immediately follow SELECT. If the annotated query includes another hint that must also follow SELECT, such as SYNTACTIC_JOIN, combine the two hints together. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT /*+ syntactic_join,verbatim*/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a name=&#34;Optimizer&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;optimizer-generated-directed-queries&#34;&gt;Optimizer-generated directed queries&lt;/h2&gt;
&lt;p&gt;The optimizer always includes the VERBATIM hint in the annotated queries that it &lt;a href=&#34;../../../../en/admin/managing-queries/directed-queries/creating-directed-queries/optimizer-generated-directed-queries/&#34;&gt;generates for directed queries&lt;/a&gt;. For example, given the following CREATE DIRECTED QUERY OPTIMIZER statement:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; CREATE DIRECTED QUERY OPTIMIZER getStoreSales SELECT sales.store_key, stores.store_name, sales.product_description, sales.sales_quantity, sales.sale_date FROM store.storesales sales JOIN store.store_dimension stores ON sales.store_key=stores.store_key WHERE sales.sale_date=&amp;#39;2014-12-01&amp;#39; /*+IGNORECONST(1)*/ AND stores.store_name=&amp;#39;Store1&amp;#39; /*+IGNORECONST(2)*/ ORDER BY sales.store_key, sales.sale_date;
CREATE DIRECTED QUERY
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The optimizer generates an annotated query that includes the VERBATIM hint:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT query_name, annotated_query FROM V_CATALOG.DIRECTED_QUERIES WHERE query_name = &amp;#39;getStoreSales&amp;#39;;
-[ RECORD 1 ]---+------
query_name      | getStoreSales
annotated_query | SELECT &lt;span class=&#34;code-input&#34;&gt;/*+ &lt;/span&gt;syntactic_join,&lt;span class=&#34;code-input&#34;&gt;verbatim*/&lt;/span&gt; sales.store_key AS store_key, stores.store_name AS store_name, sales.product_description AS product_description, sales.sales_quantity AS sales_quantity, sales.sale_date AS sale_date
FROM (store.storeSales AS sales/*+projs(&amp;#39;store.storeSales&amp;#39;)*/ JOIN /*+Distrib(L,L),JType(H)*/ store.store_dimension AS stores/*+projs(&amp;#39;store.store_dimension_DBD_10_rep_VMartDesign&amp;#39;)*/  ON (sales.store_key = stores.store_key))
WHERE (sales.sale_date = &amp;#39;2014-12-01&amp;#39;::date /*+IgnoreConst(1)*/) AND (stores.store_name = &amp;#39;Store1&amp;#39;::varchar(6) /*+IgnoreConst(2)*/)
ORDER BY 1 ASC, 5 ASC
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When the optimizer uses this directed query, it produces a query plan that is equivalent to the query plan that it used when it created the directed query:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ACTIVATE DIRECTED QUERY getStoreSales;
ACTIVATE DIRECTED QUERY

=&amp;gt; EXPLAIN SELECT sales.store_key, stores.store_name, sales.product_description, sales.sales_quantity, sales.sale_date FROM store.storesales sales JOIN store.store_dimension stores ON sales.store_key=stores.store_key WHERE sales.sale_date=&amp;#39;2014-12-04&amp;#39; AND stores.store_name=&amp;#39;Store14&amp;#39; ORDER BY sales.store_key, sales.sale_date;

 QUERY PLAN DESCRIPTION:
 ------------------------------

 EXPLAIN SELECT sales.store_key, stores.store_name, sales.product_description, sales.sales_quantity, sales.sale_date FROM store.storesales sales JOIN store.store_dimension stores ON sales.store_key=stores.store_key WHERE sales.sale_date=&amp;#39;2014-12-04&amp;#39; AND stores.store_name=&amp;#39;Store14&amp;#39; ORDER BY sales.store_key, sales.sale_date;

 The following active directed query(query name: getStoreSales) is being executed:
 SELECT /*+syntactic_join,verbatim*/ sales.store_key, stores.store_name, sales.product_description, sales.sales_quantity, sales.sale_date
FROM (store.storeSales sales/*+projs(&amp;#39;store.storeSales&amp;#39;)*/ JOIN /*+Distrib(&amp;#39;L&amp;#39;, &amp;#39;L&amp;#39;), JType(&amp;#39;H&amp;#39;)*/store.store_dimension stores
/*+projs(&amp;#39;store.store_dimension_DBD_10_rep_VMartDesign&amp;#39;)*/ ON ((sales.store_key = stores.store_key))) WHERE ((sales.sale_date = &amp;#39;2014-12-04&amp;#39;::date)
AND (stores.store_name = &amp;#39;Store14&amp;#39;::varchar(7))) ORDER BY sales.store_key, sales.sale_date

 Access Path:
 +-JOIN HASH [Cost: 463, Rows: 622 (NO STATISTICS)] (PATH ID: 2)
 |  Join Cond: (sales.store_key = stores.store_key)
 |  Materialize at Output: sales.sale_date, sales.sales_quantity, sales.product_description
 |  Execute on: All Nodes
 | +-- Outer -&amp;gt; STORAGE ACCESS for sales [Cost: 150, Rows: 155K (NO STATISTICS)] (PATH ID: 3)
 | |      Projection: store.storeSales_b0
 | |      Materialize: sales.store_key
 | |      Filter: (sales.sale_date = &amp;#39;2014-12-04&amp;#39;::date)
 | |      Execute on: All Nodes
 | |      Runtime Filter: (SIP1(HashJoin): sales.store_key)
 | +-- Inner -&amp;gt; STORAGE ACCESS for stores [Cost: 35, Rows: 2] (PATH ID: 4)
 | |      Projection: store.store_dimension_DBD_10_rep_VMartDesign_node0001
 | |      Materialize: stores.store_name, stores.store_key
 | |      Filter: (stores.store_name = &amp;#39;Store14&amp;#39;)
 | |      Execute on: All Nodes
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a name=&#34;Custom&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;custom-directed-queries&#34;&gt;Custom directed queries&lt;/h2&gt;
&lt;p&gt;The VERBATIM hint is included in a &lt;a href=&#34;../../../../en/admin/managing-queries/directed-queries/creating-directed-queries/custom-directed-queries/&#34;&gt;custom directed query&lt;/a&gt; only if you explicitly include it in the annotated query that you write for that directed query. When the optimizer uses that directed query, it respects the VERBATIM hint and creates a query plan accordingly.&lt;/p&gt;
&lt;p&gt;If you omit the VERBATIM hint when you create a custom directed query, the hint is not stored with the annotated query. When the optimizer uses that directed query, it applies its own plan development processing on the annotated query before it generates a query plan. This query plan might not be equivalent to the query plan that the optimizer would have generated for the OpenText™ Analytics Database version in which the directed query was created.&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
