hotamul의 개발 이야기

[GPDB] 마지막 Vacuum, analyze 작업 시간 확인 본문

Dev./Greenplum DB

[GPDB] 마지막 Vacuum, analyze 작업 시간 확인

hotamul 2022. 12. 16. 13:39

위 와 같이 Greenplum Command Center에서 마지막 Vacuum, Analyze 시간을 확인 할 수 있다.

Query에서 확인

pg_stat_all_tables View에서 last_vacuum, last_analyze 컬럼으로 확인 할 수 있다.

-- example select pg_stat_all_tables sql
SELECT
    schemaname,
    relname as tablename,
    last_vacuum,
    last_analyze
  FROM pg_stat_all_tables
 WHERE schemaname = 'training'
;
--- example output
 schemaname |                        tablename                         | last_vacuum |         last_analyze
------------+----------------------------------------------------------+-------------+-------------------------------
 training   | d_delay_groups                                           |             | 2022-12-15 15:42:06.646187+09
 training   | f_otp_c_p_1_prt_mth_2                                    |             |
...
Comments