PREHOOK: query: -- SORT_QUERY_RESULTS -- try the query without indexing, with manual indexing, and with automatic indexing -- without indexing EXPLAIN SELECT a.key, a.value FROM src a JOIN srcpart b ON (a.key = b.key) WHERE a.key > 80 AND a.key < 100 AND b.key > 70 AND b.key < 90 PREHOOK: type: QUERY POSTHOOK: query: -- SORT_QUERY_RESULTS -- try the query without indexing, with manual indexing, and with automatic indexing -- without indexing EXPLAIN SELECT a.key, a.value FROM src a JOIN srcpart b ON (a.key = b.key) WHERE a.key > 80 AND a.key < 100 AND b.key > 70 AND b.key < 90 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 STAGE PLANS: Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: b Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (((((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 12 Data size: 127 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string) outputColumnNames: _col0 Statistics: Num rows: 12 Data size: 127 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 12 Data size: 127 Basic stats: COMPLETE Column stats: NONE TableScan alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) and key is not null) (type: boolean) Statistics: Num rows: 3 Data size: 31 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 3 Data size: 31 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 3 Data size: 31 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: string) Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 keys: 0 _col0 (type: string) 1 _col0 (type: string) outputColumnNames: _col1, _col2 Statistics: Num rows: 13 Data size: 139 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: string), _col2 (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 13 Data size: 139 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 13 Data size: 139 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 Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: ListSink PREHOOK: query: SELECT a.key, a.value FROM src a JOIN srcpart b ON (a.key = b.key) WHERE a.key > 80 AND a.key < 100 AND b.key > 70 AND b.key < 90 PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Input: default@srcpart PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 #### A masked pattern was here #### POSTHOOK: query: SELECT a.key, a.value FROM src a JOIN srcpart b ON (a.key = b.key) WHERE a.key > 80 AND a.key < 100 AND b.key > 70 AND b.key < 90 POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 #### A masked pattern was here #### 82 val_82 82 val_82 82 val_82 82 val_82 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 85 val_85 85 val_85 85 val_85 85 val_85 86 val_86 86 val_86 86 val_86 86 val_86 87 val_87 87 val_87 87 val_87 87 val_87 PREHOOK: query: CREATE INDEX src_index ON TABLE src(key) as 'COMPACT' WITH DEFERRED REBUILD PREHOOK: type: CREATEINDEX PREHOOK: Input: default@src POSTHOOK: query: CREATE INDEX src_index ON TABLE src(key) as 'COMPACT' WITH DEFERRED REBUILD POSTHOOK: type: CREATEINDEX POSTHOOK: Input: default@src POSTHOOK: Output: default@default__src_src_index__ PREHOOK: query: ALTER INDEX src_index ON src REBUILD PREHOOK: type: ALTERINDEX_REBUILD PREHOOK: Input: default@src PREHOOK: Output: default@default__src_src_index__ POSTHOOK: query: ALTER INDEX src_index ON src REBUILD POSTHOOK: type: ALTERINDEX_REBUILD POSTHOOK: Input: default@src POSTHOOK: Output: default@default__src_src_index__ POSTHOOK: Lineage: default__src_src_index__._bucketname SIMPLE [(src)src.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] POSTHOOK: Lineage: default__src_src_index__._offsets EXPRESSION [(src)src.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] POSTHOOK: Lineage: default__src_src_index__.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] PREHOOK: query: CREATE INDEX srcpart_index ON TABLE srcpart(key) as 'COMPACT' WITH DEFERRED REBUILD PREHOOK: type: CREATEINDEX PREHOOK: Input: default@srcpart POSTHOOK: query: CREATE INDEX srcpart_index ON TABLE srcpart(key) as 'COMPACT' WITH DEFERRED REBUILD POSTHOOK: type: CREATEINDEX POSTHOOK: Input: default@srcpart POSTHOOK: Output: default@default__srcpart_srcpart_index__ PREHOOK: query: ALTER INDEX srcpart_index ON srcpart REBUILD PREHOOK: type: ALTERINDEX_REBUILD PREHOOK: Input: default@srcpart PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 PREHOOK: Output: default@default__srcpart_srcpart_index__@ds=2008-04-08/hr=11 PREHOOK: Output: default@default__srcpart_srcpart_index__@ds=2008-04-08/hr=12 PREHOOK: Output: default@default__srcpart_srcpart_index__@ds=2008-04-09/hr=11 PREHOOK: Output: default@default__srcpart_srcpart_index__@ds=2008-04-09/hr=12 POSTHOOK: query: ALTER INDEX srcpart_index ON srcpart REBUILD POSTHOOK: type: ALTERINDEX_REBUILD POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 POSTHOOK: Output: default@default__srcpart_srcpart_index__@ds=2008-04-08/hr=11 POSTHOOK: Output: default@default__srcpart_srcpart_index__@ds=2008-04-08/hr=12 POSTHOOK: Output: default@default__srcpart_srcpart_index__@ds=2008-04-09/hr=11 POSTHOOK: Output: default@default__srcpart_srcpart_index__@ds=2008-04-09/hr=12 POSTHOOK: Lineage: default__srcpart_srcpart_index__ PARTITION(ds=2008-04-09,hr=12)._bucketname SIMPLE [(srcpart)srcpart.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] POSTHOOK: Lineage: default__srcpart_srcpart_index__ PARTITION(ds=2008-04-09,hr=12)._offsets EXPRESSION [(srcpart)srcpart.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] POSTHOOK: Lineage: default__srcpart_srcpart_index__ PARTITION(ds=2008-04-09,hr=12).key SIMPLE [(srcpart)srcpart.FieldSchema(name:key, type:string, comment:default), ] PREHOOK: query: -- automatic indexing EXPLAIN SELECT a.key, a.value FROM src a JOIN srcpart b ON (a.key = b.key) WHERE a.key > 80 AND a.key < 100 AND b.key > 70 AND b.key < 90 PREHOOK: type: QUERY POSTHOOK: query: -- automatic indexing EXPLAIN SELECT a.key, a.value FROM src a JOIN srcpart b ON (a.key = b.key) WHERE a.key > 80 AND a.key < 100 AND b.key > 70 AND b.key < 90 POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-4 is a root stage Stage-9 depends on stages: Stage-4 , consists of Stage-6, Stage-5, Stage-7 Stage-6 Stage-3 depends on stages: Stage-6, Stage-5, Stage-8 Stage-1 depends on stages: Stage-3, Stage-10 Stage-5 Stage-7 Stage-8 depends on stages: Stage-7 Stage-11 is a root stage Stage-16 depends on stages: Stage-11 , consists of Stage-13, Stage-12, Stage-14 Stage-13 Stage-10 depends on stages: Stage-13, Stage-12, Stage-15 Stage-12 Stage-14 Stage-15 depends on stages: Stage-14 Stage-0 depends on stages: Stage-1 STAGE PLANS: Stage: Stage-4 Map Reduce Map Operator Tree: TableScan alias: default__srcpart_srcpart_index__ filterExpr: ((((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (type: boolean) Filter Operator predicate: ((((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (type: boolean) Select Operator expressions: _bucketname (type: string), _offsets (type: array) outputColumnNames: _col0, _col1 File Output Operator compressed: false 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 Stage: Stage-9 Conditional Operator Stage: Stage-6 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-3 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-1 Map Reduce Map Operator Tree: TableScan alias: b filterExpr: (((((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (((((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 12 Data size: 127 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string) outputColumnNames: _col0 Statistics: Num rows: 12 Data size: 127 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 12 Data size: 127 Basic stats: COMPLETE Column stats: NONE TableScan alias: a filterExpr: (((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) and key is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) and key is not null) (type: boolean) Statistics: Num rows: 3 Data size: 31 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 3 Data size: 31 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 3 Data size: 31 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: string) Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 keys: 0 _col0 (type: string) 1 _col0 (type: string) outputColumnNames: _col1, _col2 Statistics: Num rows: 13 Data size: 139 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: string), _col2 (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 13 Data size: 139 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false Statistics: Num rows: 13 Data size: 139 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 Stage: Stage-5 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false 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 Stage: Stage-7 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false 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 Stage: Stage-8 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-11 Map Reduce Map Operator Tree: TableScan alias: default__src_src_index__ filterExpr: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean) Filter Operator predicate: ((((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean) Select Operator expressions: _bucketname (type: string), _offsets (type: array) outputColumnNames: _col0, _col1 File Output Operator compressed: false 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 Stage: Stage-16 Conditional Operator Stage: Stage-13 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-10 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-12 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false 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 Stage: Stage-14 Map Reduce Map Operator Tree: TableScan File Output Operator compressed: false 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 Stage: Stage-15 Move Operator files: hdfs directory: true #### A masked pattern was here #### Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: ListSink PREHOOK: query: SELECT a.key, a.value FROM src a JOIN srcpart b ON (a.key = b.key) WHERE a.key > 80 AND a.key < 100 AND b.key > 70 AND b.key < 90 PREHOOK: type: QUERY PREHOOK: Input: default@default__src_src_index__ PREHOOK: Input: default@default__srcpart_srcpart_index__ PREHOOK: Input: default@default__srcpart_srcpart_index__@ds=2008-04-08/hr=11 PREHOOK: Input: default@default__srcpart_srcpart_index__@ds=2008-04-08/hr=12 PREHOOK: Input: default@default__srcpart_srcpart_index__@ds=2008-04-09/hr=11 PREHOOK: Input: default@default__srcpart_srcpart_index__@ds=2008-04-09/hr=12 PREHOOK: Input: default@src PREHOOK: Input: default@srcpart PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 PREHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 PREHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 #### A masked pattern was here #### POSTHOOK: query: SELECT a.key, a.value FROM src a JOIN srcpart b ON (a.key = b.key) WHERE a.key > 80 AND a.key < 100 AND b.key > 70 AND b.key < 90 POSTHOOK: type: QUERY POSTHOOK: Input: default@default__src_src_index__ POSTHOOK: Input: default@default__srcpart_srcpart_index__ POSTHOOK: Input: default@default__srcpart_srcpart_index__@ds=2008-04-08/hr=11 POSTHOOK: Input: default@default__srcpart_srcpart_index__@ds=2008-04-08/hr=12 POSTHOOK: Input: default@default__srcpart_srcpart_index__@ds=2008-04-09/hr=11 POSTHOOK: Input: default@default__srcpart_srcpart_index__@ds=2008-04-09/hr=12 POSTHOOK: Input: default@src POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 #### A masked pattern was here #### 82 val_82 82 val_82 82 val_82 82 val_82 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 83 val_83 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 84 val_84 85 val_85 85 val_85 85 val_85 85 val_85 86 val_86 86 val_86 86 val_86 86 val_86 87 val_87 87 val_87 87 val_87 87 val_87 PREHOOK: query: DROP INDEX src_index on src PREHOOK: type: DROPINDEX PREHOOK: Input: default@src POSTHOOK: query: DROP INDEX src_index on src POSTHOOK: type: DROPINDEX POSTHOOK: Input: default@src PREHOOK: query: DROP INDEX srcpart_index on src PREHOOK: type: DROPINDEX PREHOOK: Input: default@src POSTHOOK: query: DROP INDEX srcpart_index on src POSTHOOK: type: DROPINDEX POSTHOOK: Input: default@src