select count(*) from table;
How does hive evaluate count(*) on a table?
Does it return count by actually querying table, or directly return count
by consulting some statistics locally.
For Hive's Text format it takes few seconds while Hive's Orc format takes
fraction of seconds.
Regards,
Amey
, Mar 22, 2016 at 12:44 PM, Amey Barve wrote:
> select count(*) from table;
>
> How does hive evaluate count(*) on a table?
>
> Does it return count by actually querying table, or directly return count
> by consulting some statistics locally.
>
> For Hive's Text form
adeh
LinkedIn *
https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
http://talebzadehmich.wordpress.com
On 22 March 2016 at 07:14, Amey Barve wrote:
> select count(*) from table;
>
dOABUrV8Pw
> <https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>
>
>
> http://talebzadehmich.wordpress.com
>
>
>
> On 22 March 2016 at 07:14, Amey Barve wrote:
>
>> select count(*) from table;
>>
>> How does hi
rely on those if needed
>>
>>
>> HTH
>>
>>
>>
>>
>> Dr Mich Talebzadeh
>>
>>
>>
>> LinkedIn *
>> https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
>> <https://www.linkedin.com/profile/view?id=AA
Hello,
I think you might have loaded data by using an external tool into the table
location; you should run:
analyze table table1 compute statistics ;
or
analyze table table1 compute statistics for columns;
And/or disable hive.optimize.metadataonly - but having bad statistics is not
good at al