hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [02/17] incubator-hawq git commit: HAWQ-1122. Hint to disable NAryJoinDP when join has large number of children [#121181555]
Date Fri, 28 Oct 2016 03:53:05 GMT
HAWQ-1122. Hint to disable NAryJoinDP when join has large number of children [#121181555]

This is cherry-picked from greenplum-db/gpdb@30a9ed3f8758a8ef192fc66c285a4e2b61228bbb


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/9bdad630
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/9bdad630
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/9bdad630

Branch: refs/heads/master
Commit: 9bdad630744b15d2c06d3c306cf02de4a7d4998f
Parents: 95e3fe8
Author: Venkatesh (Venky) Raghavan <vraghavan@pivotal.io>
Authored: Thu Sep 29 15:41:08 2016 -0700
Committer: rlei <rlei@pivotal.io>
Committed: Fri Oct 28 11:52:20 2016 +0800

----------------------------------------------------------------------
 src/backend/gpopt/utils/COptTasks.cpp | 11 ++++++++---
 src/backend/utils/misc/guc.c          | 12 ++++++++++++
 src/include/utils/guc.h               |  1 +
 3 files changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9bdad630/src/backend/gpopt/utils/COptTasks.cpp
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/utils/COptTasks.cpp b/src/backend/gpopt/utils/COptTasks.cpp
index ec6c444..dcccfec 100644
--- a/src/backend/gpopt/utils/COptTasks.cpp
+++ b/src/backend/gpopt/utils/COptTasks.cpp
@@ -814,6 +814,7 @@ COptTasks::PoconfCreate
 	ULONG ulPartsToForceSortOnInsert =  (ULONG) optimizer_parts_to_force_sort_on_insert;
 	ULONG ulJoinArityForAssociativityCommutativity =  (ULONG) optimizer_join_arity_for_associativity_commutativity;
 	ULONG ulArrayExpansionThreshold =  (ULONG) optimizer_array_expansion_threshold;
+	ULONG ulJoinOrderThreshold = (ULONG) optimizer_join_order_threshold;
 
 	return GPOS_NEW(pmp) COptimizerConfig
 						(
@@ -821,9 +822,13 @@ COptTasks::PoconfCreate
 						GPOS_NEW(pmp) CStatisticsConfig(pmp, dDampingFactorFilter, dDampingFactorJoin, dDampingFactorGroupBy),
 						GPOS_NEW(pmp) CCTEConfig(ulCTEInliningCutoff),
 						pcm,
-						GPOS_NEW(pmp) CHint(ulPartsToForceSortOnInsert /* optimizer_parts_to_force_sort_on_insert
*/,
-										ulJoinArityForAssociativityCommutativity,
-										ulArrayExpansionThreshold)
+						GPOS_NEW(pmp) CHint
+								(
+								ulPartsToForceSortOnInsert /* optimizer_parts_to_force_sort_on_insert */,
+								ulJoinArityForAssociativityCommutativity,
+								ulArrayExpansionThreshold,
+								ulJoinOrderThreshold
+								)
 						);
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9bdad630/src/backend/utils/misc/guc.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index ee33862..03b6d88 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -745,6 +745,7 @@ int		optimizer_segments;
 int		optimizer_parts_to_force_sort_on_insert;
 int		optimizer_join_arity_for_associativity_commutativity;
 int		optimizer_array_expansion_threshold;
+int		optimizer_join_order_threshold;
 bool		optimizer_analyze_root_partition;
 bool		optimizer_analyze_midlevel_partition;
 bool		optimizer_enable_constant_expression_evaluation;
@@ -6159,6 +6160,7 @@ static struct config_int ConfigureNamesInt[] =
 		&server_ticket_renew_interval,
 		43200000, 0, INT_MAX, NULL, NULL
 	},
+
 	{
 		{"optimizer_array_expansion_threshold", PGC_USERSET, QUERY_TUNING_METHOD,
 			gettext_noop("Item limit for expansion of arrays in WHERE clause to disjunctive form."),
@@ -6168,6 +6170,16 @@ static struct config_int ConfigureNamesInt[] =
 		&optimizer_array_expansion_threshold,
 		25, 0, INT_MAX, NULL, NULL
 	},
+
+	{
+		{"optimizer_join_order_threshold", PGC_USERSET, QUERY_TUNING_METHOD,
+			gettext_noop("Maximum number of join children to use dynamic programming based join ordering
algorithm."),
+			NULL
+		},
+		&optimizer_join_order_threshold,
+		10, 0, INT_MAX, NULL, NULL
+	},
+
 	{
 		{"memory_profiler_dataset_size", PGC_USERSET, DEVELOPER_OPTIONS,
 			gettext_noop("Set the size in GB"),

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9bdad630/src/include/utils/guc.h
----------------------------------------------------------------------
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index e0cfc33..8fdab3c 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -420,6 +420,7 @@ extern int optimizer_segments;
 extern int optimizer_parts_to_force_sort_on_insert;
 extern int optimizer_join_arity_for_associativity_commutativity;
 extern int optimizer_array_expansion_threshold;
+extern int optimizer_join_order_threshold;
 extern bool optimizer_analyze_root_partition;
 extern bool optimizer_analyze_midlevel_partition;
 extern bool optimizer_enable_constant_expression_evaluation;


Mime
View raw message