Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
07-28-2021
08:03 AM
- last edited on
04-21-2026
02:00 AM
by
GrazittiAPI
I'd like to update stats (compute stats) for every table I have. I have a ton of queries that are running without them. I personally have access only to Hue for Impala, no console kind of access to server or anything. I'm able to see status of stats for a table with describe formatted <table>, but it's a major pain to look through, and I have a ton of tables.
Is there any way to get a list of all tables and the status of their stats from Hue?
Thanks!
Created 07-29-2021 07:09 AM
Hi,
I do not think we have a command to check all the table stats in one go, If you would like to update the stats on all tables i think you should prepare a custom script for it.
-> List all the tables from "show tables" command
-> copy the table names and run "show table stats <table-name>" on all the tables.
-> And then "compute stats <table-name>" on all the tables.
You can make a custom shell script with a for loop to run the compute stats on all the tables. All this should be done from terminal.
Created 07-29-2021 07:09 AM
Hi,
I do not think we have a command to check all the table stats in one go, If you would like to update the stats on all tables i think you should prepare a custom script for it.
-> List all the tables from "show tables" command
-> copy the table names and run "show table stats <table-name>" on all the tables.
-> And then "compute stats <table-name>" on all the tables.
You can make a custom shell script with a for loop to run the compute stats on all the tables. All this should be done from terminal.
Created 07-29-2021 08:00 AM
That's what I was afraid of. I'm going through Cloudera Manager and looking at queries where missing_stats=true and going through one by one more or less. Thanks for the response!