Created on 07-28-2021 08:03 AM - last edited on 07-28-2021 12:52 PM by cjervis
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!