Is there a Hive query to quickly find table size (i.e. number of rows) without launching a time-consuming MapReduce job? (Which is why I want to avoid COUNT(*)
.)
It is a good question. the count() will take much time for finding the result. But unfortunately, count() is the only way to do.
There is an alternative way(can't say alternate but better latency than above case) :
Set the property
set hive.exec.mode.local.auto=true;
and run the same command ( select count(*) from tbl
) which gives better latency than prior.