http://git-wip-us.apache.org/repos/asf/hive/blob/09b6f9a3/ql/src/test/results/clientpositive/perf/query67.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/perf/query67.q.out b/ql/src/test/results/clientpositive/perf/query67.q.out new file mode 100644 index 0000000..33a7da2 --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query67.q.out @@ -0,0 +1,249 @@ +PREHOOK: query: explain +select * +from (select i_category + ,i_class + ,i_brand + ,i_product_name + ,d_year + ,d_qoy + ,d_moy + ,s_store_id + ,sumsales + ,rank() over (partition by i_category order by sumsales desc) rk + from (select i_category + ,i_class + ,i_brand + ,i_product_name + ,d_year + ,d_qoy + ,d_moy + ,s_store_id + ,sum(coalesce(ss_sales_price*ss_quantity,0)) sumsales + from store_sales + ,date_dim + ,store + ,item + where store_sales.ss_sold_date_sk=date_dim.d_date_sk + and store_sales.ss_item_sk=item.i_item_sk + and store_sales.ss_store_sk = store.s_store_sk + and d_month_seq between 1193 and 1193+11 + group by i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy,s_store_id with rollup)dw1) dw2 +where rk <= 100 +order by i_category + ,i_class + ,i_brand + ,i_product_name + ,d_year + ,d_qoy + ,d_moy + ,s_store_id + ,sumsales + ,rk +limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain +select * +from (select i_category + ,i_class + ,i_brand + ,i_product_name + ,d_year + ,d_qoy + ,d_moy + ,s_store_id + ,sumsales + ,rank() over (partition by i_category order by sumsales desc) rk + from (select i_category + ,i_class + ,i_brand + ,i_product_name + ,d_year + ,d_qoy + ,d_moy + ,s_store_id + ,sum(coalesce(ss_sales_price*ss_quantity,0)) sumsales + from store_sales + ,date_dim + ,store + ,item + where store_sales.ss_sold_date_sk=date_dim.d_date_sk + and store_sales.ss_item_sk=item.i_item_sk + and store_sales.ss_store_sk = store.s_store_sk + and d_month_seq between 1193 and 1193+11 + group by i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy,s_store_id with rollup)dw1) dw2 +where rk <= 100 +order by i_category + ,i_class + ,i_brand + ,i_product_name + ,d_year + ,d_qoy + ,d_moy + ,s_store_id + ,sumsales + ,rk +limit 100 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE) +Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) +Reducer 6 <- Reducer 5 (SIMPLE_EDGE) +Reducer 7 <- Reducer 6 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:100 + Stage-1 + Reducer 7 + File Output Operator [FS_42] + compressed:false + Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE + table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"} + Limit [LIM_41] + Number of rows:100 + Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_40] + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"] + | Statistics:Num rows: 762300 Data size: 1094874777 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 6 [SIMPLE_EDGE] + Reduce Output Operator [RS_39] + key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), _col8 (type: decimal(28,2)), _col9 (type: int) + sort order:++++++++++ + Statistics:Num rows: 762300 Data size: 1094874777 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_35] + outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"] + Statistics:Num rows: 762300 Data size: 1094874777 Basic stats: COMPLETE Column stats: NONE + Filter Operator [FIL_52] + predicate:(rank_window_0 <= 100) (type: boolean) + Statistics:Num rows: 762300 Data size: 1094874777 Basic stats: COMPLETE Column stats: NONE + PTF Operator [PTF_34] + Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col9(DESC)","partition by:":"_col0"}] + Statistics:Num rows: 2286900 Data size: 3284624331 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_33] + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col9"] + | Statistics:Num rows: 2286900 Data size: 3284624331 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 5 [SIMPLE_EDGE] + Reduce Output Operator [RS_32] + key expressions:_col0 (type: string), _col9 (type: decimal(28,2)) + Map-reduce partition columns:_col0 (type: string) + sort order:+- + Statistics:Num rows: 2286900 Data size: 3284624331 Basic stats: COMPLETE Column stats: NONE + value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), _col9 (type: decimal(28,2)) + Group By Operator [GBY_31] + | aggregations:["sum(VALUE._col0)"] + | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: int), KEY._col5 (type: int), KEY._col6 (type: int), KEY._col7 (type: string), KEY._col8 (type: string) + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col9"] + | Statistics:Num rows: 2286900 Data size: 3284624331 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 4 [SIMPLE_EDGE] + Reduce Output Operator [RS_30] + key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), _col8 (type: string) + Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), _col8 (type: string) + sort order:+++++++++ + Statistics:Num rows: 4573800 Data size: 6569248662 Basic stats: COMPLETE Column stats: NONE + value expressions:_col9 (type: decimal(28,2)) + Group By Operator [GBY_29] + aggregations:["sum(_col8)"] + keys:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), '0' (type: string) + outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"] + Statistics:Num rows: 4573800 Data size: 6569248662 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_27] + outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] + Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE + Merge Join Operator [MERGEJOIN_59] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col3","_col4","_col7","_col8","_col9","_col11","_col13","_col14","_col15","_col16"] + | Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE + |<-Map 10 [SIMPLE_EDGE] + | Reduce Output Operator [RS_25] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE + | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string) + | Select Operator [SEL_11] + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"] + | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_56] + | predicate:i_item_sk is not null (type: boolean) + | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_9] + | alias:item + | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 3 [SIMPLE_EDGE] + Reduce Output Operator [RS_23] + key expressions:_col1 (type: int) + Map-reduce partition columns:_col1 (type: int) + sort order:+ + Statistics:Num rows: 44193 Data size: 49453132 Basic stats: COMPLETE Column stats: NONE + value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col7 (type: int), _col8 (type: int), _col9 (type: int), _col11 (type: string) + Merge Join Operator [MERGEJOIN_58] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col1","_col3","_col4","_col7","_col8","_col9","_col11"] + | Statistics:Num rows: 44193 Data size: 49453132 Basic stats: COMPLETE Column stats: NONE + |<-Map 9 [SIMPLE_EDGE] + | Reduce Output Operator [RS_20] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE + | value expressions:_col1 (type: string) + | Select Operator [SEL_8] + | outputColumnNames:["_col0","_col1"] + | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_55] + | predicate:s_store_sk is not null (type: boolean) + | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_6] + | alias:store + | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 2 [SIMPLE_EDGE] + Reduce Output Operator [RS_18] + key expressions:_col2 (type: int) + Map-reduce partition columns:_col2 (type: int) + sort order:+ + Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE + value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col7 (type: int), _col8 (type: int), _col9 (type: int) + Merge Join Operator [MERGEJOIN_57] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col1","_col2","_col3","_col4","_col7","_col8","_col9"] + | Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE + |<-Map 1 [SIMPLE_EDGE] + | Reduce Output Operator [RS_13] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)) + | Select Operator [SEL_2] + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"] + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + | Filter Operator [FIL_53] + | predicate:((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_item_sk is not null) (type: boolean) + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + | TableScan [TS_0] + | alias:store_sales + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + |<-Map 8 [SIMPLE_EDGE] + Reduce Output Operator [RS_15] + key expressions:_col0 (type: int) + Map-reduce partition columns:_col0 (type: int) + sort order:+ + Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE + value expressions:_col2 (type: int), _col3 (type: int), _col4 (type: int) + Select Operator [SEL_5] + outputColumnNames:["_col0","_col2","_col3","_col4"] + Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE + Filter Operator [FIL_54] + predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean) + Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE + TableScan [TS_3] + alias:date_dim + Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE +
http://git-wip-us.apache.org/repos/asf/hive/blob/09b6f9a3/ql/src/test/results/clientpositive/perf/query68.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/perf/query68.q.out b/ql/src/test/results/clientpositive/perf/query68.q.out new file mode 100644 index 0000000..bfe90da --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query68.q.out @@ -0,0 +1,241 @@ +PREHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,extended_price ,extended_tax ,list_price from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_ext_sales_price) extended_price ,sum(ss_ext_list_price) list_price ,sum(ss_ext_tax) extended_tax from store_sales ,date_dim ,store ,household_demographics ,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem') group by ss_ticket_number ,ss_customer_sk ,ss_addr_sk,ca_city) dn ,customer ,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer .c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,ss_ticket_number limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,extended_price ,extended_tax ,list_price from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_ext_sales_price) extended_price ,sum(ss_ext_list_price) list_price ,sum(ss_ext_tax) extended_tax from store_sales ,date_dim ,store ,household_demographics ,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem') group by ss_ticket_number ,ss_customer_sk ,ss_addr_sk,ca_city) dn ,customer ,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and custome r.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,ss_ticket_number limit 100 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE) +Reducer 3 <- Map 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Map 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Map 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE) +Reducer 6 <- Reducer 5 (SIMPLE_EDGE) +Reducer 7 <- Map 14 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE) +Reducer 8 <- Map 15 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) +Reducer 9 <- Reducer 8 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:100 + Stage-1 + Reducer 9 + File Output Operator [FS_62] + compressed:false + Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE + table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"} + Limit [LIM_61] + Number of rows:100 + Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_60] + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] + | Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 8 [SIMPLE_EDGE] + Reduce Output Operator [RS_59] + key expressions:_col0 (type: string), _col4 (type: int) + sort order:++ + Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE + value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2)) + Select Operator [SEL_58] + outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] + Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE + Filter Operator [FIL_90] + predicate:(_col11 <> _col2) (type: boolean) + Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE + Merge Join Operator [MERGEJOIN_103] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col7 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col0","_col2","_col3","_col4","_col5","_col8","_col9","_col11"] + | Statistics:Num rows: 96800003 Data size: 83249958789 Basic stats: COMPLETE Column stats: NONE + |<-Map 15 [SIMPLE_EDGE] + | Reduce Output Operator [RS_55] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE + | value expressions:_col1 (type: string) + | Select Operator [SEL_46] + | outputColumnNames:["_col0","_col1"] + | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_97] + | predicate:ca_address_sk is not null (type: boolean) + | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_44] + | alias:customer_address + | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 7 [SIMPLE_EDGE] + Reduce Output Operator [RS_53] + key expressions:_col7 (type: int) + Map-reduce partition columns:_col7 (type: int) + sort order:+ + Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE + value expressions:_col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col8 (type: string), _col9 (type: string) + Merge Join Operator [MERGEJOIN_102] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col0","_col2","_col3","_col4","_col5","_col7","_col8","_col9"] + | Statistics:Num rows: 88000001 Data size: 75681779077 Basic stats: COMPLETE Column stats: NONE + |<-Map 14 [SIMPLE_EDGE] + | Reduce Output Operator [RS_50] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE + | value expressions:_col1 (type: int), _col2 (type: string), _col3 (type: string) + | Select Operator [SEL_43] + | outputColumnNames:["_col0","_col1","_col2","_col3"] + | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_96] + | predicate:(c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean) + | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_41] + | alias:customer + | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 6 [SIMPLE_EDGE] + Reduce Output Operator [RS_48] + key expressions:_col1 (type: int) + Map-reduce partition columns:_col1 (type: int) + sort order:+ + Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE + value expressions:_col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)) + Select Operator [SEL_39] + outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"] + Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE + Group By Operator [GBY_38] + | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"] + | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string) + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] + | Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 5 [SIMPLE_EDGE] + Reduce Output Operator [RS_37] + key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string) + Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string) + sort order:++++ + Statistics:Num rows: 44000000 Data size: 44654715780 Basic stats: COMPLETE Column stats: NONE + value expressions:_col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)) + Group By Operator [GBY_36] + aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"] + keys:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col18 (type: string) + outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] + Statistics:Num rows: 44000000 Data size: 44654715780 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_35] + outputColumnNames:["_col1","_col3","_col5","_col18","_col6","_col7","_col8"] + Statistics:Num rows: 44000000 Data size: 44654715780 Basic stats: COMPLETE Column stats: NONE + Merge Join Operator [MERGEJOIN_101] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col1","_col3","_col5","_col6","_col7","_col8","_col18"] + | Statistics:Num rows: 44000000 Data size: 44654715780 Basic stats: COMPLETE Column stats: NONE + |<-Map 13 [SIMPLE_EDGE] + | Reduce Output Operator [RS_33] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE + | value expressions:_col1 (type: string) + | Select Operator [SEL_14] + | outputColumnNames:["_col0","_col1"] + | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_95] + | predicate:ca_address_sk is not null (type: boolean) + | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_12] + | alias:customer_address + | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 4 [SIMPLE_EDGE] + Reduce Output Operator [RS_31] + key expressions:_col3 (type: int) + Map-reduce partition columns:_col3 (type: int) + sort order:+ + Statistics:Num rows: 24305 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE + value expressions:_col1 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)) + Merge Join Operator [MERGEJOIN_100] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col1","_col3","_col5","_col6","_col7","_col8"] + | Statistics:Num rows: 24305 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE + |<-Map 12 [SIMPLE_EDGE] + | Reduce Output Operator [RS_28] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE + | Select Operator [SEL_11] + | outputColumnNames:["_col0"] + | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_94] + | predicate:(((hd_dep_count = 4) or (hd_vehicle_count = 2)) and hd_demo_sk is not null) (type: boolean) + | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_9] + | alias:household_demographics + | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 3 [SIMPLE_EDGE] + Reduce Output Operator [RS_26] + key expressions:_col2 (type: int) + Map-reduce partition columns:_col2 (type: int) + sort order:+ + Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE + value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)) + Merge Join Operator [MERGEJOIN_99] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col1","_col2","_col3","_col5","_col6","_col7","_col8"] + | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE + |<-Map 11 [SIMPLE_EDGE] + | Reduce Output Operator [RS_23] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE + | Select Operator [SEL_8] + | outputColumnNames:["_col0"] + | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_93] + | predicate:((s_city) IN ('Rosedale', 'Bethlehem') and s_store_sk is not null) (type: boolean) + | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_6] + | alias:store + | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 2 [SIMPLE_EDGE] + Reduce Output Operator [RS_21] + key expressions:_col4 (type: int) + Map-reduce partition columns:_col4 (type: int) + sort order:+ + Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE + value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)) + Merge Join Operator [MERGEJOIN_98] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] + | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE + |<-Map 1 [SIMPLE_EDGE] + | Reduce Output Operator [RS_16] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)) + | Select Operator [SEL_2] + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + | Filter Operator [FIL_91] + | predicate:((((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) and ss_customer_sk is not null) (type: boolean) + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + | TableScan [TS_0] + | alias:store_sales + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + |<-Map 10 [SIMPLE_EDGE] + Reduce Output Operator [RS_18] + key expressions:_col0 (type: int) + Map-reduce partition columns:_col0 (type: int) + sort order:+ + Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_5] + outputColumnNames:["_col0"] + Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE + Filter Operator [FIL_92] + predicate:(((d_year) IN (1998, 1999, 2000) and d_dom BETWEEN 1 AND 2) and d_date_sk is not null) (type: boolean) + Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE + TableScan [TS_3] + alias:date_dim + Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE + http://git-wip-us.apache.org/repos/asf/hive/blob/09b6f9a3/ql/src/test/results/clientpositive/perf/query7.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientpositive/perf/query7.q.out b/ql/src/test/results/clientpositive/perf/query7.q.out new file mode 100644 index 0000000..5e1b0ed --- /dev/null +++ b/ql/src/test/results/clientpositive/perf/query7.q.out @@ -0,0 +1,174 @@ +PREHOOK: query: explain select i_item_id, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, item, promotion where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and store_sales.ss_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100 +PREHOOK: type: QUERY +POSTHOOK: query: explain select i_item_id, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, item, promotion where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and store_sales.ss_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100 +POSTHOOK: type: QUERY +Plan optimized by CBO. + +Vertex dependency in root stage +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE) +Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE) +Reducer 6 <- Reducer 5 (SIMPLE_EDGE) +Reducer 7 <- Reducer 6 (SIMPLE_EDGE) + +Stage-0 + Fetch Operator + limit:100 + Stage-1 + Reducer 7 + File Output Operator [FS_43] + compressed:false + Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE + table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"} + Limit [LIM_42] + Number of rows:100 + Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_41] + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"] + | Statistics:Num rows: 279510 Data size: 401454093 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 6 [SIMPLE_EDGE] + Reduce Output Operator [RS_40] + key expressions:_col0 (type: string) + sort order:+ + Statistics:Num rows: 279510 Data size: 401454093 Basic stats: COMPLETE Column stats: NONE + value expressions:_col1 (type: double), _col2 (type: decimal(11,6)), _col3 (type: decimal(11,6)), _col4 (type: decimal(11,6)) + Group By Operator [GBY_38] + | aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)","avg(VALUE._col3)"] + | keys:KEY._col0 (type: string) + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"] + | Statistics:Num rows: 279510 Data size: 401454093 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 5 [SIMPLE_EDGE] + Reduce Output Operator [RS_37] + key expressions:_col0 (type: string) + Map-reduce partition columns:_col0 (type: string) + sort order:+ + Statistics:Num rows: 559020 Data size: 802908187 Basic stats: COMPLETE Column stats: NONE + value expressions:_col1 (type: struct<count:bigint,sum:double,input:int>), _col2 (type: struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>), _col3 (type: struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>), _col4 (type: struct<count:bigint,sum:decimal(17,2),input:decimal(7,2)>) + Group By Operator [GBY_36] + aggregations:["avg(_col4)","avg(_col5)","avg(_col7)","avg(_col6)"] + keys:_col15 (type: string) + outputColumnNames:["_col0","_col1","_col2","_col3","_col4"] + Statistics:Num rows: 559020 Data size: 802908187 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_35] + outputColumnNames:["_col15","_col4","_col5","_col7","_col6"] + Statistics:Num rows: 559020 Data size: 802908187 Basic stats: COMPLETE Column stats: NONE + Merge Join Operator [MERGEJOIN_66] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col4","_col5","_col6","_col7","_col15"] + | Statistics:Num rows: 559020 Data size: 802908187 Basic stats: COMPLETE Column stats: NONE + |<-Map 11 [SIMPLE_EDGE] + | Reduce Output Operator [RS_33] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE + | Select Operator [SEL_14] + | outputColumnNames:["_col0"] + | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_62] + | predicate:(((p_channel_email = 'N') or (p_channel_event = 'N')) and p_promo_sk is not null) (type: boolean) + | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_12] + | alias:promotion + | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 4 [SIMPLE_EDGE] + Reduce Output Operator [RS_31] + key expressions:_col3 (type: int) + Map-reduce partition columns:_col3 (type: int) + sort order:+ + Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE + value expressions:_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col15 (type: string) + Merge Join Operator [MERGEJOIN_65] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col3","_col4","_col5","_col6","_col7","_col15"] + | Statistics:Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE + |<-Map 10 [SIMPLE_EDGE] + | Reduce Output Operator [RS_28] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE + | value expressions:_col1 (type: string) + | Select Operator [SEL_11] + | outputColumnNames:["_col0","_col1"] + | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_61] + | predicate:i_item_sk is not null (type: boolean) + | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_9] + | alias:item + | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 3 [SIMPLE_EDGE] + Reduce Output Operator [RS_26] + key expressions:_col1 (type: int) + Map-reduce partition columns:_col1 (type: int) + sort order:+ + Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE + value expressions:_col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)) + Merge Join Operator [MERGEJOIN_64] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7"] + | Statistics:Num rows: 40176 Data size: 44957392 Basic stats: COMPLETE Column stats: NONE + |<-Map 9 [SIMPLE_EDGE] + | Reduce Output Operator [RS_23] + | key expressions:_col0 (type: int) + | Map-reduce partition columns:_col0 (type: int) + | sort order:+ + | Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE + | Select Operator [SEL_8] + | outputColumnNames:["_col0"] + | Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE + | Filter Operator [FIL_60] + | predicate:((d_year = 1998) and d_date_sk is not null) (type: boolean) + | Statistics:Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE + | TableScan [TS_6] + | alias:date_dim + | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE + |<-Reducer 2 [SIMPLE_EDGE] + Reduce Output Operator [RS_21] + key expressions:_col0 (type: int) + Map-reduce partition columns:_col0 (type: int) + sort order:+ + Statistics:Num rows: 2722 Data size: 986020 Basic stats: COMPLETE Column stats: NONE + value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)) + Merge Join Operator [MERGEJOIN_63] + | condition map:[{"":"Inner Join 0 to 1"}] + | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"} + | outputColumnNames:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"] + | Statistics:Num rows: 2722 Data size: 986020 Basic stats: COMPLETE Column stats: NONE + |<-Map 1 [SIMPLE_EDGE] + | Reduce Output Operator [RS_16] + | key expressions:_col2 (type: int) + | Map-reduce partition columns:_col2 (type: int) + | sort order:+ + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + | value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)) + | Select Operator [SEL_2] + | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + | Filter Operator [FIL_58] + | predicate:(((ss_cdemo_sk is not null and ss_sold_date_sk is not null) and ss_item_sk is not null) and ss_promo_sk is not null) (type: boolean) + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + | TableScan [TS_0] + | alias:store_sales + | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE + |<-Map 8 [SIMPLE_EDGE] + Reduce Output Operator [RS_18] + key expressions:_col0 (type: int) + Map-reduce partition columns:_col0 (type: int) + sort order:+ + Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE + Select Operator [SEL_5] + outputColumnNames:["_col0"] + Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE + Filter Operator [FIL_59] + predicate:((((cd_gender = 'F') and (cd_marital_status = 'W')) and (cd_education_status = 'Primary')) and cd_demo_sk is not null) (type: boolean) + Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE + TableScan [TS_3] + alias:customer_demographics + Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE +