0

SELECT COUNT(*) from customer_tbl is giving 8000 as count. If I do SELECT * from customer_tbl is returning only 2 records. I have gathered the stats on the table still same problem. Could you please help me.

Thanks in advance.

Amit Kumar
  • 1,544
  • 11
  • 23
Rock
  • 65
  • 8
  • `select count(*)` is **broken by design**. Don't ask me why. It's fast and wrong -- hurrah, it's fast! Try to force Hive to spawn an actual Yarn job e.g. `select count(*) from XYZ where ID is not null` where you know that ID cannot be null in that table... – Samson Scharfrichter Dec 05 '17 at 08:31
  • Looks like a duplicate of https://stackoverflow.com/questions/24080276/wrong-result-for-count-in-hive-table. Does the answers in the other post help? – Ramesh Dec 05 '17 at 09:13

0 Answers0