hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hubertzh...@apache.org
Subject incubator-hawq git commit: HAWQ-580. Set analyze vseg number for partition and no-partition table separately.
Date Mon, 28 Mar 2016 02:28:12 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 12b029ff1 -> 3db0b6fea


HAWQ-580. Set analyze vseg number for partition and no-partition table separately.


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

Branch: refs/heads/master
Commit: 3db0b6feaa1f0ee3821bf39a3a94a44eeffafb6a
Parents: 12b029f
Author: hzhang2 <zhanghuan929@163.com>
Authored: Mon Mar 28 10:11:00 2016 +0800
Committer: hzhang2 <zhanghuan929@163.com>
Committed: Mon Mar 28 10:28:15 2016 +0800

----------------------------------------------------------------------
 src/backend/postmaster/identity.c |  6 ++++--
 src/backend/utils/misc/guc.c      | 16 +++++++++++++---
 src/include/utils/guc.h           |  3 ++-
 3 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3db0b6fe/src/backend/postmaster/identity.c
----------------------------------------------------------------------
diff --git a/src/backend/postmaster/identity.c b/src/backend/postmaster/identity.c
index a17958b..0418a3a 100644
--- a/src/backend/postmaster/identity.c
+++ b/src/backend/postmaster/identity.c
@@ -456,12 +456,14 @@ int	GetAnalyzeVSegNumLimit(bool isPartitionTableExist)
 {
 	int perSegLimit = isPartitionTableExist ? hawq_rm_nvseg_for_analyze_part_perquery_perseg_limit
 			: hawq_rm_nvseg_for_analyze_nopart_perquery_perseg_limit;
+	int perQueryLimit = isPartitionTableExist ? hawq_rm_nvseg_for_analyze_part_perquery_limit
+				: hawq_rm_nvseg_for_analyze_nopart_perquery_limit;
 	int nvseg = perSegLimit * slaveHostNumber;
-	while(nvseg > hawq_rm_nvseg_for_analyze_perquery_limit){
+	while(nvseg > perQueryLimit){
 		nvseg -= slaveHostNumber;
 	}
 	if(nvseg <= 0){
-		nvseg = hawq_rm_nvseg_for_analyze_perquery_limit;
+		nvseg = perQueryLimit;
 	}
 	return nvseg;
 }

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3db0b6fe/src/backend/utils/misc/guc.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 9477dbc..851dfcb 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -737,7 +737,8 @@ int default_hash_table_bucket_number;
 int hawq_rm_nvseg_for_copy_from_perquery;
 int hawq_rm_nvseg_for_analyze_nopart_perquery_perseg_limit;
 int hawq_rm_nvseg_for_analyze_part_perquery_perseg_limit;
-int hawq_rm_nvseg_for_analyze_perquery_limit;
+int hawq_rm_nvseg_for_analyze_nopart_perquery_limit;
+int hawq_rm_nvseg_for_analyze_part_perquery_limit;
 double	  optimizer_cost_threshold;
 double  optimizer_nestloop_factor;
 double  locality_upper_bound;
@@ -4548,11 +4549,20 @@ static struct config_int ConfigureNamesInt[] =
 	},
 
 	{
-		{"hawq_rm_nvseg_for_analyze_perquery_limit", PGC_USERSET, QUERY_TUNING_OTHER,
+		{"hawq_rm_nvseg_for_analyze_nopart_perquery_limit", PGC_USERSET, QUERY_TUNING_OTHER,
 			gettext_noop("Sets default virtual segment number per query limit for analyze statement"),
 			NULL
 		},
-		&hawq_rm_nvseg_for_analyze_perquery_limit,
+		&hawq_rm_nvseg_for_analyze_nopart_perquery_limit,
+		512, 1, 65535, NULL, NULL
+	},
+
+	{
+		{"hawq_rm_nvseg_for_analyze_part_perquery_limit", PGC_USERSET, QUERY_TUNING_OTHER,
+			gettext_noop("Sets default virtual segment number per query limit for analyze statement"),
+			NULL
+		},
+		&hawq_rm_nvseg_for_analyze_part_perquery_limit,
 		256, 1, 65535, NULL, NULL
 	},
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/3db0b6fe/src/include/utils/guc.h
----------------------------------------------------------------------
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index edab452..c70c491 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -312,7 +312,8 @@ extern int default_hash_table_bucket_number;
 extern int hawq_rm_nvseg_for_copy_from_perquery;
 extern int hawq_rm_nvseg_for_analyze_nopart_perquery_perseg_limit;
 extern int hawq_rm_nvseg_for_analyze_part_perquery_perseg_limit;
-extern int hawq_rm_nvseg_for_analyze_perquery_limit;
+extern int hawq_rm_nvseg_for_analyze_nopart_perquery_limit;
+extern int hawq_rm_nvseg_for_analyze_part_perquery_limit;
 
 extern char *ConfigFileName;
 extern char *HbaFileName;


Mime
View raw message