trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [01/15] incubator-trafodion git commit: Following changes are done in BMO memory quota
Date Wed, 13 Sep 2017 23:23:19 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master cd5419573 -> 6177090d9


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/00e3b874/core/sql/regress/seabase/EXPECTED011
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/EXPECTED011 b/core/sql/regress/seabase/EXPECTED011
index bd28f64..8c569db 100644
--- a/core/sql/regress/seabase/EXPECTED011
+++ b/core/sql/regress/seabase/EXPECTED011
@@ -7,7 +7,7 @@
 >>invoke T011T1;
 
 -- Definition of Trafodion table TRAFODION.SCH.T011T1
--- Definition current  Fri Feb 17 17:11:37 2017
+-- Definition current  Wed Mar 15 04:56:19 2017
 
   (
     A                                INT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -143,7 +143,7 @@ A            B
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... NOT NAMED
-PLAN_ID .................. 212354111499137048
+PLAN_ID .................. 212356313781270580
 ROWS_OUT ................. 7
 EST_TOTAL_COST ........... 0.01
 STATEMENT ................ select * from t011t1 where a >= 3 and a < 5;
@@ -156,6 +156,7 @@ ROWS_OUT ................. 7
 EST_OPER_COST ............ 0
 EST_TOTAL_COST ........... 0.01
 DESCRIPTION
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
   max_card_est .......... 11
   fragment_id ............ 0
   parent_frag ............ (none)
@@ -182,7 +183,7 @@ DESCRIPTION
   QUERY_CACHE ............ 0
   TRAF_ALIGNED_ROW_FORMAT  OFF
   GENERATE_EXPLAIN ....... ON
-  ObjectUIDs ............. 1451969908907031756
+  ObjectUIDs ............. 8107166460522311880
   select_list ............ TRAFODION.SCH.T011T1.A, TRAFODION.SCH.T011T1.B
 
 
@@ -1275,7 +1276,7 @@ METRIC_TEXT_TABLE
 >>invoke trafodion."_REPOS_".metric_query_table;
 
 -- Definition of Trafodion table TRAFODION."_REPOS_".METRIC_QUERY_TABLE
--- Definition current  Fri Feb 17 17:13:41 2017
+-- Definition current  Wed Mar 15 04:58:05 2017
 
   (
     INSTANCE_ID                      INT UNSIGNED NO DEFAULT NOT NULL NOT
@@ -1463,7 +1464,7 @@ METRIC_TEXT_TABLE
 >>-- get qid for the prepared stmt
 >>get qid for statement explstmt;
 
-MXID11000018963212354111473302000000000000206U3333300_2378_EXPLSTMT
+MXID11000014401212356313741542000000000000206U3333300_2496_EXPLSTMT
 
 --- SQL operation complete.
 >>
@@ -1515,7 +1516,7 @@ SEQ_NUM      OPERATOR
 --- SQL command prepared.
 >>get qid for statement explstmt2;
 
-MXID11000018963212354111473302000000000000206U3333300_2389_EXPLSTMT2
+MXID11000014401212356313741542000000000000206U3333300_2507_EXPLSTMT2
 
 --- SQL operation complete.
 >>set qid MXID123456 for explstmt2;
@@ -2078,6 +2079,12 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION        
  CARD
 
 --- SQL operation complete.
 >>
+PLAN_ID .................. 212356313965892034
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
+  ObjectUIDs ............. 8107166460522328383, 8107166460522328813
+PLAN_ID .................. 212356313967422361
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
+  ObjectUIDs ............. 8107166460522329555, 8107166460522329995
 >>
 >>
 >>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/00e3b874/core/sql/regress/seabase/EXPECTED016
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/EXPECTED016 b/core/sql/regress/seabase/EXPECTED016
index ca81ae2..1919aa7 100644
--- a/core/sql/regress/seabase/EXPECTED016
+++ b/core/sql/regress/seabase/EXPECTED016
@@ -179,9 +179,9 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212341125600218829
+PLAN_ID .................. 212356389659920262
 ROWS_OUT ................. 1
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 STATEMENT ................ select f,count(f)
                            from mcStatPart7 <<+ cardinality 10e8 >>
                            group by f;
@@ -192,8 +192,9 @@ ROOT ======================================  SEQ_NO 5        ONLY CHILD
4
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
@@ -224,7 +225,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 4615735661077609573
+  ObjectUIDs ............. 8834497876105223292
   select_list ............ TRAFODION.HBASE.MCSTATPART7.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART7.
                              F)))
@@ -234,13 +235,14 @@ HASH_PARTIAL_GROUPBY_ROOT =================  SEQ_NO 4        ONLY CHILD
3
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
   memory_quota ........... 1200 MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
+  est_memory_per_instance  0.041 KB
   grouping_columns ....... TRAFODION.HBASE.MCSTATPART7.F
   aggregates ............. sum(count_nonull(TRAFODION.HBASE.MCSTATPART7.F))
 
@@ -249,12 +251,13 @@ ESP_EXCHANGE ==============================  SEQ_NO 3        ONLY CHILD
2
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
   parent_frag ............ 0
   fragment_type .......... esp
+  est_memory_per_node .... 29.297 KB
   buffer_size ........ 5,000
   record_length ......... 16
   parent_processes ....... 1
@@ -267,8 +270,8 @@ DESCRIPTION
 HASH_PARTIAL_GROUPBY_LEAF =================  SEQ_NO 2        ONLY CHILD 1
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
-EST_OPER_COST ............ 4.98
-EST_TOTAL_COST ......... 553.48
+EST_OPER_COST ............ 1.99
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
@@ -282,8 +285,8 @@ TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... MCSTATPART7
 REQUESTS_IN .............. 1
 ROWS_OUT ..... 1,000,000,000
-EST_OPER_COST .......... 548.5
-EST_TOTAL_COST ......... 548.5
+EST_OPER_COST .......... 477.46
+EST_TOTAL_COST ......... 477.46
 DESCRIPTION
   max_card_est ........... 1e+09
   fragment_id ............ 2
@@ -325,9 +328,9 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212341125600682569
+PLAN_ID .................. 212356389660135016
 ROWS_OUT ................. 1
-EST_TOTAL_COST ......... 568.59
+EST_TOTAL_COST ......... 493.55
 STATEMENT ................ select f,count(f)
                            from mcStatPart5 <<+ cardinality 10e8 >>
                            group by f;
@@ -338,8 +341,9 @@ ROOT ======================================  SEQ_NO 5        ONLY CHILD
4
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0
-EST_TOTAL_COST ......... 568.59
+EST_TOTAL_COST ......... 493.55
 DESCRIPTION
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
@@ -370,7 +374,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 4615735661077611408
+  ObjectUIDs ............. 8834497876105225664
   select_list ............ TRAFODION.HBASE.MCSTATPART5.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART5.
                              F)))
@@ -380,13 +384,14 @@ HASH_PARTIAL_GROUPBY_ROOT =================  SEQ_NO 4        ONLY CHILD
3
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 568.59
+EST_TOTAL_COST ......... 493.55
 DESCRIPTION
   memory_quota ........... 1200 MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
+  est_memory_per_instance  0.041 KB
   grouping_columns ....... TRAFODION.HBASE.MCSTATPART5.F
   aggregates ............. sum(count_nonull(TRAFODION.HBASE.MCSTATPART5.F))
 
@@ -395,12 +400,13 @@ ESP_EXCHANGE ==============================  SEQ_NO 3        ONLY CHILD
2
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 568.59
+EST_TOTAL_COST ......... 493.55
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
   parent_frag ............ 0
   fragment_type .......... esp
+  est_memory_per_node .... 29.297 KB
   buffer_size ........ 5,000
   record_length ......... 16
   parent_processes ....... 1
@@ -413,8 +419,8 @@ DESCRIPTION
 HASH_PARTIAL_GROUPBY_LEAF =================  SEQ_NO 2        ONLY CHILD 1
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
-EST_OPER_COST ............ 4.98
-EST_TOTAL_COST ......... 568.59
+EST_OPER_COST ............ 1.99
+EST_TOTAL_COST ......... 493.55
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
@@ -428,8 +434,8 @@ TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... MCSTATPART5
 REQUESTS_IN .............. 1
 ROWS_OUT ..... 1,000,000,000
-EST_OPER_COST .......... 563.62
-EST_TOTAL_COST ......... 563.62
+EST_OPER_COST .......... 491.56
+EST_TOTAL_COST ......... 491.56
 DESCRIPTION
   max_card_est ........... 1e+09
   fragment_id ............ 2
@@ -471,9 +477,9 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212341125601113093
+PLAN_ID .................. 212356389660322806
 ROWS_OUT ................. 1
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 STATEMENT ................ select f,count(f)
                            from mcStatPart3 <<+ cardinality 10e8 >>
                            group by f;
@@ -484,8 +490,9 @@ ROOT ======================================  SEQ_NO 5        ONLY CHILD
4
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
@@ -516,7 +523,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 4615735661077612835
+  ObjectUIDs ............. 8834497876105227029
   select_list ............ TRAFODION.HBASE.MCSTATPART3.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART3.
                              F)))
@@ -526,13 +533,14 @@ HASH_PARTIAL_GROUPBY_ROOT =================  SEQ_NO 4        ONLY CHILD
3
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
   memory_quota ........... 1200 MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
+  est_memory_per_instance  0.041 KB
   grouping_columns ....... TRAFODION.HBASE.MCSTATPART3.F
   aggregates ............. sum(count_nonull(TRAFODION.HBASE.MCSTATPART3.F))
 
@@ -541,12 +549,13 @@ ESP_EXCHANGE ==============================  SEQ_NO 3        ONLY CHILD
2
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
   parent_frag ............ 0
   fragment_type .......... esp
+  est_memory_per_node .... 29.297 KB
   buffer_size ........ 5,000
   record_length ......... 16
   parent_processes ....... 1
@@ -559,8 +568,8 @@ DESCRIPTION
 HASH_PARTIAL_GROUPBY_LEAF =================  SEQ_NO 2        ONLY CHILD 1
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
-EST_OPER_COST ............ 4.98
-EST_TOTAL_COST ......... 553.48
+EST_OPER_COST ............ 1.99
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
@@ -574,8 +583,8 @@ TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... MCSTATPART3
 REQUESTS_IN .............. 1
 ROWS_OUT ..... 1,000,000,000
-EST_OPER_COST .......... 548.5
-EST_TOTAL_COST ......... 548.5
+EST_OPER_COST .......... 477.46
+EST_TOTAL_COST ......... 477.46
 DESCRIPTION
   max_card_est ........... 1e+09
   fragment_id ............ 2
@@ -617,9 +626,9 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212341125601513932
+PLAN_ID .................. 212356389660516738
 ROWS_OUT ................. 1
-EST_TOTAL_COST ......... 523.92
+EST_TOTAL_COST ......... 451.99
 STATEMENT ................ select f,count(f)
                            from mcStatPart6 <<+ cardinality 10e8 >>
                            group by f;
@@ -630,8 +639,9 @@ ROOT ======================================  SEQ_NO 5        ONLY CHILD
4
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0
-EST_TOTAL_COST ......... 523.92
+EST_TOTAL_COST ......... 451.99
 DESCRIPTION
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
@@ -662,7 +672,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 4615735661077614228
+  ObjectUIDs ............. 8834497876105228765
   select_list ............ TRAFODION.HBASE.MCSTATPART6.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART6.
                              F)))
@@ -672,13 +682,14 @@ HASH_PARTIAL_GROUPBY_ROOT =================  SEQ_NO 4        ONLY CHILD
3
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 523.92
+EST_TOTAL_COST ......... 451.99
 DESCRIPTION
   memory_quota ........... 1200 MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
+  est_memory_per_instance  0.041 KB
   grouping_columns ....... TRAFODION.HBASE.MCSTATPART6.F
   aggregates ............. sum(count_nonull(TRAFODION.HBASE.MCSTATPART6.F))
 
@@ -687,12 +698,13 @@ ESP_EXCHANGE ==============================  SEQ_NO 3        ONLY CHILD
2
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 523.92
+EST_TOTAL_COST ......... 451.99
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
   parent_frag ............ 0
   fragment_type .......... esp
+  est_memory_per_node .... 29.297 KB
   buffer_size ........ 5,000
   record_length ......... 16
   parent_processes ....... 1
@@ -705,8 +717,8 @@ DESCRIPTION
 HASH_PARTIAL_GROUPBY_LEAF =================  SEQ_NO 2        ONLY CHILD 1
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
-EST_OPER_COST ............ 4.98
-EST_TOTAL_COST ......... 523.92
+EST_OPER_COST ............ 1.99
+EST_TOTAL_COST ......... 451.99
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
@@ -720,8 +732,8 @@ TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... MCSTATPART6
 REQUESTS_IN .............. 1
 ROWS_OUT ..... 1,000,000,000
-EST_OPER_COST .......... 518.94
-EST_TOTAL_COST ......... 518.94
+EST_OPER_COST .......... 450
+EST_TOTAL_COST ......... 450
 DESCRIPTION
   max_card_est ........... 1e+09
   fragment_id ............ 2
@@ -763,9 +775,9 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212341125601934693
+PLAN_ID .................. 212356389660712070
 ROWS_OUT ................. 1
-EST_TOTAL_COST ......... 523.92
+EST_TOTAL_COST ......... 451.99
 STATEMENT ................ select f,count(f)
                            from mcStatPart2 <<+ cardinality 10e8 >>
                            group by f;
@@ -776,8 +788,9 @@ ROOT ======================================  SEQ_NO 5        ONLY CHILD
4
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0
-EST_TOTAL_COST ......... 523.92
+EST_TOTAL_COST ......... 451.99
 DESCRIPTION
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
@@ -808,7 +821,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 4615735661077615714
+  ObjectUIDs ............. 8834497876105230514
   select_list ............ TRAFODION.HBASE.MCSTATPART2.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART2.
                              F)))
@@ -818,13 +831,14 @@ HASH_PARTIAL_GROUPBY_ROOT =================  SEQ_NO 4        ONLY CHILD
3
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 523.92
+EST_TOTAL_COST ......... 451.99
 DESCRIPTION
   memory_quota ........... 1200 MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
+  est_memory_per_instance  0.041 KB
   grouping_columns ....... TRAFODION.HBASE.MCSTATPART2.F
   aggregates ............. sum(count_nonull(TRAFODION.HBASE.MCSTATPART2.F))
 
@@ -833,12 +847,13 @@ ESP_EXCHANGE ==============================  SEQ_NO 3        ONLY CHILD
2
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 523.92
+EST_TOTAL_COST ......... 451.99
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
   parent_frag ............ 0
   fragment_type .......... esp
+  est_memory_per_node .... 29.297 KB
   buffer_size ........ 5,000
   record_length ......... 16
   parent_processes ....... 1
@@ -851,8 +866,8 @@ DESCRIPTION
 HASH_PARTIAL_GROUPBY_LEAF =================  SEQ_NO 2        ONLY CHILD 1
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
-EST_OPER_COST ............ 4.98
-EST_TOTAL_COST ......... 523.92
+EST_OPER_COST ............ 1.99
+EST_TOTAL_COST ......... 451.99
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
@@ -866,8 +881,8 @@ TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... MCSTATPART2
 REQUESTS_IN .............. 1
 ROWS_OUT ..... 1,000,000,000
-EST_OPER_COST .......... 518.94
-EST_TOTAL_COST ......... 518.94
+EST_OPER_COST .......... 450
+EST_TOTAL_COST ......... 450
 DESCRIPTION
   max_card_est ........... 1e+09
   fragment_id ............ 2
@@ -909,9 +924,9 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212341125602445711
+PLAN_ID .................. 212356389660911781
 ROWS_OUT ................. 1
-EST_TOTAL_COST ......... 538.3
+EST_TOTAL_COST ......... 465.32
 STATEMENT ................ select f,count(f)
                            from mcStatPart1 <<+ cardinality 10e8 >>
                            group by f;
@@ -922,8 +937,9 @@ ROOT ======================================  SEQ_NO 5        ONLY CHILD
4
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0
-EST_TOTAL_COST ......... 538.3
+EST_TOTAL_COST ......... 465.32
 DESCRIPTION
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
@@ -954,7 +970,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 4615735661077617072
+  ObjectUIDs ............. 8834497876105232246
   select_list ............ TRAFODION.HBASE.MCSTATPART1.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART1.
                              F)))
@@ -964,13 +980,14 @@ HASH_PARTIAL_GROUPBY_ROOT =================  SEQ_NO 4        ONLY CHILD
3
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 538.3
+EST_TOTAL_COST ......... 465.32
 DESCRIPTION
   memory_quota ........... 1200 MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
+  est_memory_per_instance  0.041 KB
   grouping_columns ....... TRAFODION.HBASE.MCSTATPART1.F
   aggregates ............. sum(count_nonull(TRAFODION.HBASE.MCSTATPART1.F))
 
@@ -979,12 +996,13 @@ ESP_EXCHANGE ==============================  SEQ_NO 3        ONLY CHILD
2
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 538.3
+EST_TOTAL_COST ......... 465.32
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
   parent_frag ............ 0
   fragment_type .......... esp
+  est_memory_per_node .... 29.297 KB
   buffer_size ........ 5,000
   record_length ......... 16
   parent_processes ....... 1
@@ -997,8 +1015,8 @@ DESCRIPTION
 HASH_PARTIAL_GROUPBY_LEAF =================  SEQ_NO 2        ONLY CHILD 1
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
-EST_OPER_COST ............ 4.98
-EST_TOTAL_COST ......... 538.3
+EST_OPER_COST ............ 1.99
+EST_TOTAL_COST ......... 465.32
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
@@ -1012,8 +1030,8 @@ TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... MCSTATPART1
 REQUESTS_IN .............. 1
 ROWS_OUT ..... 1,000,000,000
-EST_OPER_COST .......... 533.33
-EST_TOTAL_COST ......... 533.33
+EST_OPER_COST .......... 463.33
+EST_TOTAL_COST ......... 463.33
 DESCRIPTION
   max_card_est ........... 1e+09
   fragment_id ............ 2
@@ -1055,9 +1073,9 @@ LC   RC   OP   OPERATOR              OPT       DESCRIPTION         
 CARD
 ------------------------------------------------------------------ PLAN SUMMARY
 MODULE_NAME .............. DYNAMICALLY COMPILED
 STATEMENT_NAME ........... ST1
-PLAN_ID .................. 212341125602861602
+PLAN_ID .................. 212356389661126399
 ROWS_OUT ................. 1
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 STATEMENT ................ select f,count(f)
                            from mcStatPart8 <<+ cardinality 10e8 >>
                            group by f;
@@ -1068,8 +1086,9 @@ ROOT ======================================  SEQ_NO 5        ONLY CHILD
4
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
+  est_memory_per_node .... 10240.00(Limit), 0.00(BMOs), 0.00(nBMOs) MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
@@ -1100,7 +1119,7 @@ DESCRIPTION
   HBASE_MIN_BYTES_PER_ESP  1
   USTAT_COLLECT_MC_SKEW_V  ON
   PARALLEL_NUM_ESPS ...... 4
-  ObjectUIDs ............. 4615735661077618405
+  ObjectUIDs ............. 8834497876105233956
   select_list ............ TRAFODION.HBASE.MCSTATPART8.F,
                              cast(sum(count_nonull(TRAFODION.HBASE.MCSTATPART8.
                              F)))
@@ -1110,13 +1129,14 @@ HASH_PARTIAL_GROUPBY_ROOT =================  SEQ_NO 4        ONLY
CHILD 3
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
   memory_quota ........... 1200 MB
   max_card_est ........... 1
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
+  est_memory_per_instance  0.041 KB
   grouping_columns ....... TRAFODION.HBASE.MCSTATPART8.F
   aggregates ............. sum(count_nonull(TRAFODION.HBASE.MCSTATPART8.F))
 
@@ -1125,12 +1145,13 @@ ESP_EXCHANGE ==============================  SEQ_NO 3        ONLY
CHILD 2
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
 EST_OPER_COST ............ 0.01
-EST_TOTAL_COST ......... 553.48
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
   parent_frag ............ 0
   fragment_type .......... esp
+  est_memory_per_node .... 29.297 KB
   buffer_size ........ 5,000
   record_length ......... 16
   parent_processes ....... 1
@@ -1143,8 +1164,8 @@ DESCRIPTION
 HASH_PARTIAL_GROUPBY_LEAF =================  SEQ_NO 2        ONLY CHILD 1
 REQUESTS_IN .............. 1
 ROWS_OUT ................. 1
-EST_OPER_COST ............ 4.98
-EST_TOTAL_COST ......... 553.48
+EST_OPER_COST ............ 1.99
+EST_TOTAL_COST ......... 479.46
 DESCRIPTION
   max_card_est ........... 1
   fragment_id ............ 2
@@ -1158,8 +1179,8 @@ TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
 TABLE_NAME ............... MCSTATPART8
 REQUESTS_IN .............. 1
 ROWS_OUT ..... 1,000,000,000
-EST_OPER_COST .......... 548.5
-EST_TOTAL_COST ......... 548.5
+EST_OPER_COST .......... 477.46
+EST_TOTAL_COST ......... 477.46
 DESCRIPTION
   max_card_est ........... 1e+09
   fragment_id ............ 2

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/00e3b874/core/sql/sort/SortTopN.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sort/SortTopN.cpp b/core/sql/sort/SortTopN.cpp
index 0ef3221..5d557c3 100644
--- a/core/sql/sort/SortTopN.cpp
+++ b/core/sql/sort/SortTopN.cpp
@@ -73,7 +73,7 @@ SortTopN::SortTopN(ULng32 runsize, ULng32 sortmaxmem, ULng32  recsize,
   
   isHeapified_ = FALSE;
   
-  topNKeys_  = (RecKeyBuffer *)heap_->allocateMemory(sizeof(RecKeyBuffer) * allocRunSize_);
 
+  topNKeys_  =  (RecKeyBuffer *) new (heap_) BYTE[sizeof(RecKeyBuffer) * allocRunSize_];
 
   
   // Below asserts useful in debug mode. 
   ex_assert(topNKeys_  != NULL, "Sort: Initial topNKeys_ allocation failed");  
@@ -125,6 +125,8 @@ Lng32 SortTopN::sortSend(void *rec, ULng32 len, void* tupp)
        //Note lookIndex_ contains the current number of filled elements.
         buildHeap();
     }
+    if (bmoStats_)
+       bmoStats_->updateBMOHeapUsage((NAHeap *)heap_);
     return SORT_SUCCESS;
   }
   
@@ -133,7 +135,7 @@ Lng32 SortTopN::sortSend(void *rec, ULng32 len, void* tupp)
   //new rec key with the root node of the heap ( root node is always the greatest).
   insertRec(rec, len, tupp);
   return SORT_SUCCESS;
- }
+}
 
 
 void SortTopN::buildHeap() 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/00e3b874/core/sql/sort/SortUtil.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sort/SortUtil.cpp b/core/sql/sort/SortUtil.cpp
index 812914d..e5f6f7d 100644
--- a/core/sql/sort/SortUtil.cpp
+++ b/core/sql/sort/SortUtil.cpp
@@ -924,7 +924,7 @@ NABoolean SortUtil::consumeMemoryQuota(UInt32 bufferSizeBytes)
           config_->callingTcb_->getGlobals()->castToExExeStmtGlobals();
     
     //Check if memory quota is available.
-    if(exe_glob->unusedMemoryQuota() < memNeededMB)
+    if(GetCliGlobals()->unusedMemoryQuota() < memNeededMB)
     {
       return FALSE;
     }
@@ -934,7 +934,7 @@ NABoolean SortUtil::consumeMemoryQuota(UInt32 bufferSizeBytes)
     config_->memoryQuotaMB_ += (short)memNeededMB;
     if(this->withinMemoryLimitsAndPressure(bufferSizeBytes))
     {
-      if(exe_glob->grabMemoryQuotaIfAvailable(memNeededMB))
+      if(GetCliGlobals()->grabMemoryQuotaIfAvailable(memNeededMB))
       {
         config_->memoryQuotaUsedBytes_ += bufferSizeBytes;
         return TRUE;
@@ -1013,7 +1013,7 @@ void SortUtil::returnExcessMemoryQuota(UInt32 overheadPerRecord)
     ExExeStmtGlobals* exe_glob = 
         config_->callingTcb_->getGlobals()->castToExExeStmtGlobals();
     
-    exe_glob->yieldMemoryQuota((UInt32) excessMemoryQuotaMB);
+    GetCliGlobals()->yieldMemoryQuota((UInt32) excessMemoryQuotaMB);
     config_->memoryQuotaMB_ -= (short)excessMemoryQuotaMB;
   }      
 }    
@@ -1030,7 +1030,7 @@ UInt32 SortUtil::getMaxAvailableQuotaMB(void)
    UInt32 maxAvailableQuotaMB =
             config_->memoryQuotaMB_ -
             (config_->memoryQuotaUsedBytes_/ONE_MB) +
-            exe_glob->unusedMemoryQuota();
+            GetCliGlobals()->unusedMemoryQuota();
                    
    return (maxAvailableQuotaMB);
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/00e3b874/core/sql/sqlcomp/DefaultConstants.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/DefaultConstants.h b/core/sql/sqlcomp/DefaultConstants.h
index 71176a6..597c8ee 100644
--- a/core/sql/sqlcomp/DefaultConstants.h
+++ b/core/sql/sqlcomp/DefaultConstants.h
@@ -2696,9 +2696,6 @@ enum DefaultConstants
   // perform substring transformation (ICBC PoC)
   SUBSTRING_TRANSFORMATION,
 
-  // Memory not available for BMOs in master fragment in mxosrvr
-  // (mostly due to QIO).
-  EXE_MEMORY_RESERVED_FOR_MXOSRVR_IN_MB,
 
   // by default, a primary key or unique constraint must be non-nullable.
   // This default, if set, allows them to be nullable.
@@ -2906,19 +2903,16 @@ enum DefaultConstants
 
 
   // Total mem size (MB) for a query
-  EXE_MEMORY_LIMIT_PER_CPU, 
-
-  // The percent of total nBMO memory in EXE_MEMORY_LIMIT_PER_CPU 
-  EXE_MEMORY_LIMIT_NONBMOS_PERCENT, 
+  BMO_MEMORY_LIMIT_PER_NODE, 
 
   // lower-bound memory limit for BMOs 
-  EXE_MEMORY_LIMIT_LOWER_BOUND_HASHJOIN,
+  BMO_MEMORY_LIMIT_LOWER_BOUND_HASHJOIN,
   EXE_MEMORY_LIMIT_LOWER_BOUND_MERGEJOIN,
-  EXE_MEMORY_LIMIT_LOWER_BOUND_HASHGROUPBY ,
-  EXE_MEMORY_LIMIT_LOWER_BOUND_SORT ,
+  BMO_MEMORY_LIMIT_LOWER_BOUND_HASHGROUPBY ,
+  BMO_MEMORY_LIMIT_LOWER_BOUND_SORT ,
 
   // lower-bound memory limit for nBMOs 
-  EXE_MEMORY_LIMIT_LOWER_BOUND_PROBE_CACHE ,
+  BMO_MEMORY_LIMIT_LOWER_BOUND_PROBE_CACHE ,
   EXE_MEMORY_LIMIT_LOWER_BOUND_PA ,
   EXE_MEMORY_LIMIT_LOWER_BOUND_SEQUENCE ,
   EXE_MEMORY_LIMIT_LOWER_BOUND_EXCHANGE ,
@@ -3905,6 +3899,9 @@ enum DefaultConstants
   // on hive could be created without registering them.
   // This default is for internal testing usage only and not externalized.
   HIVE_NO_REGISTER_OBJECTS,
+ 
+  BMO_MEMORY_LIMIT_UPPER_BOUND,
+  BMO_MEMORY_ESTIMATE_RATIO_CAP,
 
   // if set, cleanse output of explain text by filtering values that
   // may not be deterministic on different systems.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/00e3b874/core/sql/sqlcomp/nadefaults.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/nadefaults.cpp b/core/sql/sqlcomp/nadefaults.cpp
index 5603ca3..9de911b 100644
--- a/core/sql/sqlcomp/nadefaults.cpp
+++ b/core/sql/sqlcomp/nadefaults.cpp
@@ -464,6 +464,14 @@ SDDkwd__(ALLOW_DP2_ROW_SAMPLING,               "SYSTEM"),
 
   DDflte_(BMO_CITIZENSHIP_FACTOR,             "1."),
 
+  DDflte_(BMO_MEMORY_ESTIMATE_RATIO_CAP,             "0.7"),
+  DDui___(BMO_MEMORY_LIMIT_LOWER_BOUND_HASHGROUPBY , "25"),
+  DDui___(BMO_MEMORY_LIMIT_LOWER_BOUND_HASHJOIN,     "25"),
+  DDui___(BMO_MEMORY_LIMIT_LOWER_BOUND_PROBE_CACHE , "25"),
+  DDui___(BMO_MEMORY_LIMIT_LOWER_BOUND_SORT ,        "200"),
+ XDDui___(BMO_MEMORY_LIMIT_PER_NODE,	             "10240"),
+  DDui___(BMO_MEMORY_LIMIT_UPPER_BOUND,              "1200"),
+
   DDui1__(BMO_MEMORY_SIZE,                      "204800"),
   // percentage of physical main memory availabe for BMO.
   // This value is only used by HJ and HGB to come up with
@@ -1335,22 +1343,9 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS,		"OFF"),
 
   // lower-bound memory limit for BMOs/nbmos (in MB)
   DDui___(EXE_MEMORY_LIMIT_LOWER_BOUND_EXCHANGE, "10"),
-  DDui___(EXE_MEMORY_LIMIT_LOWER_BOUND_HASHGROUPBY , "10"),
-  DDui___(EXE_MEMORY_LIMIT_LOWER_BOUND_HASHJOIN, "10"),
   DDui___(EXE_MEMORY_LIMIT_LOWER_BOUND_MERGEJOIN, "10"),
   DDui___(EXE_MEMORY_LIMIT_LOWER_BOUND_PA , "10"),
-  DDui___(EXE_MEMORY_LIMIT_LOWER_BOUND_PROBE_CACHE , "10"),
   DDui___(EXE_MEMORY_LIMIT_LOWER_BOUND_SEQUENCE , "10"),
-  DDui___(EXE_MEMORY_LIMIT_LOWER_BOUND_SORT , "10"),
-
-  // total memory limit per CPU per query in MB
-  DDpct1_50(EXE_MEMORY_LIMIT_NONBMOS_PERCENT, "15"),
-  XDDui___(EXE_MEMORY_LIMIT_PER_CPU,	"0"),
-
-
-  // Memory not available for BMOs in master fragment in mxosrvr
-  // (mostly due to QIO).
-  DDui___(EXE_MEMORY_RESERVED_FOR_MXOSRVR_IN_MB,"544"),
 
  // Override the memory quota system; set limit per each and every BMO
  SDDflt__(EXE_MEM_LIMIT_PER_BMO_IN_MB,	        "0"),
@@ -5178,11 +5173,11 @@ NABoolean NADefaults::isReadonlyAttribute(const char* attrName) const
        ( stricmp(attrName, "VALIDATE_VIEWS_AT_OPEN_TIME") == 0 ) ||
        ( stricmp(attrName, "USER_EXPERIENCE_LEVEL") == 0 ) ||
        ( stricmp(attrName, "POS_DISKS_IN_SEGMENT") == 0 ) ||
-       ( stricmp(attrName, "EXE_MEMORY_LIMIT_LOWER_BOUND_HASHJOIN") == 0 ) ||
+       ( stricmp(attrName, "BMO_MEMORY_LIMIT_LOWER_BOUND_HASHJOIN") == 0 ) ||
        ( stricmp(attrName, "EXE_MEMORY_LIMIT_LOWER_BOUND_MERGEJOIN") == 0 ) ||
-       ( stricmp(attrName, "EXE_MEMORY_LIMIT_LOWER_BOUND_HASHGROUPBY") == 0 ) ||
-       ( stricmp(attrName, "EXE_MEMORY_LIMIT_LOWER_BOUND_SORT") == 0 ) ||
-       ( stricmp(attrName, "EXE_MEMORY_LIMIT_LOWER_BOUND_PROBE_CACHE") == 0 ) ||
+       ( stricmp(attrName, "BMO_MEMORY_LIMIT_LOWER_BOUND_HASHGROUPBY") == 0 ) ||
+       ( stricmp(attrName, "BMO_MEMORY_LIMIT_LOWER_BOUND_SORT") == 0 ) ||
+       ( stricmp(attrName, "BMO_MEMORY_LIMIT_LOWER_BOUND_PROBE_CACHE") == 0 ) ||
        ( stricmp(attrName, "EXE_MEMORY_LIMIT_LOWER_BOUND_PA") == 0 ) ||
        ( stricmp(attrName, "EXE_MEMORY_LIMIT_LOWER_BOUND_SEQUENCE") == 0 ) ||
        ( stricmp(attrName, "EXE_MEMORY_LIMIT_LOWER_BOUND_EXCHANGE") == 0 ) ||


Mime
View raw message