Hive's explain command

Source: Internet
Author: User

Hive's explain command, which displays the execution plan for the SQL query.

The hive query is transformed into a sequence phase (this is a forward-free graph). These stages may be mapper/reducer stages, or Metastore or file system operations, such as move and rename phases.

Example

Hive>  explain    >Select* from student                     > by age;

1. Abstract syntax tree for queries. "I use hive-0.13, not showing abstract syntax tree"

2. Dependencies between different phases of the implementation plan plan

okstage DEPENDENCIES:  Stage-1 is a root stage  stage-0 is a root Stage

3. Description of each scenario

STAGE PLANS:Stage:Stage-1map Reduce Map Operator Tree:// occurs during the map processing phase of the job Tablescan alias:student//tablescan with Studen table as inputStatistics: Num rows:0Data Size: AboutBasic stats:partialColumnStats:noneSelectOperator expressions:age (type:int), name (type:string) Outputcolumnnames: _col0, _col1Statistics: Num rows:0Data Size: AboutBasic stats:partialColumnstats:none Reduce Output OperatorKeyExpressions: _col0 (Type:int) SortOrder:+Map-Reduce partition columns: _col0 (Type:int)                Statistics: Num rows:0Data Size: AboutBasic stats:partialColumnstats:none Value Expressions: _col0 (Type:int), _col1 (type:string) Reduce Operator Tree:// occurs during the reduce processing phase of the job ExtractStatistics: Num rows:0Data Size: AboutBasic stats:partialColumnStats:noneFileOutput Operator Compressed:falseStatistics: Num rows:0Data Size: AboutBasic stats:partialColumnStats:noneTable:                                // Description The input format is Textinputformat input Format:org.apache.hadoop.mapred.TextInputFormat // Description Output format is Hiveignorekeytextoutputformat output Format:org.apache.hadoop.hive.ql.io.HiveIgnoreKey Textoutputformat serde:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe stage:stage-0    FetchOperator Limit:-1                    //-- No limit in job Time taken:0.085Seconds, fetched: $Row (s)

Hive's explain command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.