Reputation: 1659
It is noticed that count(*)
does not give the updated count, after replacing the already existing data file, with a new file containing different number of records, in the HDFS location of the external table.
Is there a way to refresh this value? Or, will it get automatically refreshed after a configurable time duration?
Upvotes: 1
Views: 3098
Reputation: 3115
Hive maintains a cache of some table statistics including the number of rows. Try executing ANALYZE TABLE tablename COMPUTE STATISTICS
to update these cached stats and run the query again. See Statistics in Hive for details.
Upvotes: 4