Repository: incubator-impala
Updated Branches:
  refs/heads/master 78776e9b5 -> b4c24ad2a


IMPALA-6803: [DOCS] Clarify scope of STRAIGHT_JOIN hint

Add some boilerplate wording and reuse the same text
in several likely spots where readers might expect it
(under the pages for performance tuning with joins, hints,
views, and subqueries).

Change-Id: Ibd8e4d8e5260f5a2b7b5c52dc3269bb373b9c76f
Reviewed-on: http://gerrit.cloudera.org:8080/8336
Reviewed-by: Alex Behm <[email protected]>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/3b5a3633
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/3b5a3633
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/3b5a3633

Branch: refs/heads/master
Commit: 3b5a36337f190481cef7ebef398324805d7e4485
Parents: 78776e9
Author: John Russell <[email protected]>
Authored: Thu Oct 19 11:44:10 2017 -0700
Committer: Impala Public Jenkins <[email protected]>
Committed: Sat Oct 21 00:06:38 2017 +0000

----------------------------------------------------------------------
 docs/shared/impala_common.xml     | 7 +++++++
 docs/topics/impala_hints.xml      | 2 ++
 docs/topics/impala_perf_joins.xml | 4 ++++
 docs/topics/impala_subqueries.xml | 2 ++
 docs/topics/impala_views.xml      | 2 ++
 5 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/3b5a3633/docs/shared/impala_common.xml
----------------------------------------------------------------------
diff --git a/docs/shared/impala_common.xml b/docs/shared/impala_common.xml
index 84cc7a2..1993127 100644
--- a/docs/shared/impala_common.xml
+++ b/docs/shared/impala_common.xml
@@ -2864,6 +2864,13 @@ flight_num:           INT32 SNAPPY DO:83456393 
FPO:83488603 SZ:10216514/11474301
         <codeph>SELECT</codeph> and any <codeph>DISTINCT</codeph> or 
<codeph>ALL</codeph> keywords.
       </p>
 
+      <p id="straight_join_nested_queries" rev="IMPALA-6083">
+        The <codeph>STRAIGHT_JOIN</codeph> hint affects the join order of 
table references in the query
+        block containing the hint. It does not affect the join order of nested 
queries, such as views,
+        inline views, or <codeph>WHERE</codeph>-clause subqueries. To use this 
hint for performance
+        tuning of complex queries, apply the hint to all query blocks that 
need a fixed join order.
+      </p>
+
       <p id="catalog_server_124">
         In Impala 1.2.4 and higher, you can specify a table name with 
<codeph>INVALIDATE METADATA</codeph> after
         the table is created in Hive, allowing you to make individual tables 
visible to Impala without doing a full

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/3b5a3633/docs/topics/impala_hints.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_hints.xml b/docs/topics/impala_hints.xml
index 843d9be..d489048 100644
--- a/docs/topics/impala_hints.xml
+++ b/docs/topics/impala_hints.xml
@@ -136,6 +136,8 @@ INSERT <varname>insert_clauses</varname>
       reordering the tables in a way that makes the join-related hints 
ineffective.
     </p>
 
+    <p 
conref="../shared/impala_common.xml#common/straight_join_nested_queries"/>
+
     <p>
       To reduce the need to use hints, run the <codeph>COMPUTE STATS</codeph> 
statement against all tables involved
       in joins, or used as the source tables for <codeph>INSERT ... 
SELECT</codeph> operations where the

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/3b5a3633/docs/topics/impala_perf_joins.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_perf_joins.xml 
b/docs/topics/impala_perf_joins.xml
index 9cae4ef..05dadbb 100644
--- a/docs/topics/impala_perf_joins.xml
+++ b/docs/topics/impala_perf_joins.xml
@@ -157,6 +157,10 @@ under the License.
         table is on the left, followed by the next largest, and so on until 
the smallest table is on the right.
       </p>
 
+      <note>
+        <p 
conref="../shared/impala_common.xml#common/straight_join_nested_queries"/>
+      </note>
+
       <p>
         In this example, the subselect from the <codeph>BIG</codeph> table 
produces a very small result set, but
         the table might still be treated as if it were the biggest and placed 
first in the join order. Using

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/3b5a3633/docs/topics/impala_subqueries.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_subqueries.xml 
b/docs/topics/impala_subqueries.xml
index b7dd5af..7c3bb34 100644
--- a/docs/topics/impala_subqueries.xml
+++ b/docs/topics/impala_subqueries.xml
@@ -202,6 +202,8 @@ Therefore, this is not an efficient construct to use with 
Impala queries for HBa
 <codeblock>SELECT * FROM t1 one WHERE id IN (SELECT parent FROM t1 two WHERE 
t1.parent = t2.id);
 </codeblock>
 
+    <p 
conref="../shared/impala_common.xml#common/straight_join_nested_queries"/>
+
     <p conref="../shared/impala_common.xml#common/internals_blurb"/>
 
     <p>

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/3b5a3633/docs/topics/impala_views.xml
----------------------------------------------------------------------
diff --git a/docs/topics/impala_views.xml b/docs/topics/impala_views.xml
index 678f681..cefa2f9 100644
--- a/docs/topics/impala_views.xml
+++ b/docs/topics/impala_views.xml
@@ -173,6 +173,8 @@ select * from top_10_days;</codeblock>
 
     <p conref="../shared/impala_common.xml#common/complex_types_views"/>
 
+    <p 
conref="../shared/impala_common.xml#common/straight_join_nested_queries"/>
+
     <p conref="../shared/impala_common.xml#common/restrictions_blurb"/>
 
     <ul>

Reply via email to