Method 1: Using pg_stat_all_tables



select schemaname,relname,last_analyze,last_vacuum from pg_stat_all_tables where schemaname='schema_name' and relname in ('table1','table2');

 


Method 2: Using pg_stat_operations


select schemaname,objname,actionname,subtype,statime  from pg_stat_operations where actionname in ('VACUUM','ANALYZE') and schemaname='schema_name' and objname in ('table1','table2'); order by 2,5,3;

 


Method 3: Using gpperfmon gpmetrics.gpcc_table_info


\c gpperfmon

 

select schema,table_name,owner,last_analyze,last_vacuum,last_vacuum_full,last_seq_scan,n_tup_ins,n_tup_del,n_tup_upd,size,row_cnt from gpmetrics.gpcc_table_info where schema ilike 'schema_name'  and

table_name in ('table1','table2');