why hive explain command always shows same result on different conditisions?

19 Views Asked by At

I run below command to analyze table in hive.

analyze table my_partitioned_table partition(day='20230101') COMPUTE STATISTICS FOR COLUMNS

and when it finishes i try this to see explain before running query.

explain
select * from my_partitioned_table where day='20230101';

it gets

statistics: Num rows: 10250 Data size: 500000 Basic stats: Complete Column stats: None

the row count is correct.

when i try this

  explain
    select * from my_partitioned_table where day='20230101' and my_col1='test';

or this

  explain
    select * from my_partitioned_table where day='20230101' and my_col2='test2';

it gets same result , exactly half of before result :

statistics: Num rows: 5125 Data size: 250000 Basic stats: Complete Column stats: None

So what is the problem ? why it gets same result( wrong result about row count)

0

There are 0 best solutions below