Statistics will be stored as part of tables meta data.

From: Vivek Sharma [mailto:[email protected]]
Sent: Thursday, February 09, 2017 3:07 AM
To: [email protected]
Subject: Re: Num Rows computed by EXPLAIN - Hive


Thanks Pengcheng. It worked. Now I am curious to know, where is this data 
stored ? i.e. the data about the table statistics. For example, in Oracle we 
store these in DBA_TABLES and so on.



Regards

Vivek

________________________________
From: Pengcheng Xiong <[email protected]<mailto:[email protected]>>
Sent: Thursday, February 9, 2017 7:12 AM
To: [email protected]<mailto:[email protected]>
Subject: Re: Num Rows computed by EXPLAIN - Hive

Did u run "analyze table emp compute statistics" before you run the explain? 
thanks.

Pengcheng

On Wed, Feb 8, 2017 at 9:29 PM, Vivek Sharma 
<[email protected]<mailto:[email protected]>> wrote:

Hi,



I am new to Hive (just few days of learning).



I am an Oracle Performance Expert and am comparing the Explain feature of Hive 
with Oracle Explain Plan command. I have an Internal Table with around 100 Rows 
in it. However, the Explain command in Hive computes this as 33, which looks to 
be huge discrepancy and cause a performance issues (for a larger table). Wanted 
to know the internal calculations of Hive to come out with the NUM ROWS. The 
output is pasted below (The table actually has 100 Rows) :


hive (vivek)> explain select country, empno from emp;
OK
Explain
STAGE DEPENDENCIES:
  Stage-0 is a root stage

STAGE PLANS:
  Stage: Stage-0
    Fetch Operator
      limit: -1
      Processor Tree:
        TableScan
          alias: emp
          Statistics: Num rows: 33 Data size: 3501 Basic stats: COMPLETE Column 
stats: NONE
          Select Operator
            expressions: country (type: string), empno (type: int)
            outputColumnNames: _col0, _col1
            Statistics: Num rows: 33 Data size: 3501 Basic stats: COMPLETE 
Column stats: NONE
            ListSink

Regards
Vivek


----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.

Reply via email to