일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Linux
- 노드
- DB
- 설정
- java
- script
- hamonikr
- PostgreSQL
- python
- 스크립트
- JS
- 설치
- Atlassian
- 하모니카
- 자바스크립트
- postgres
- DATABASE
- 파이썬
- Windows
- 아틀라시안
- 우분투
- 리눅스
- node
- 3.0
- javascript
- 자바
- 데이터베이스
- ubuntu
- install
- 윈도우
Archives
- Today
- Total
LukeHan 의 잡다한 기술 블로그
postgresql 혹은 timescale 에서 전체 테이블 크기 구하기 본문
반응형
select
table_schema,
table_name,
pg_relation_size(table_schema||'.'||table_name),
pg_size_pretty(pg_relation_size(quote_ident(table_name))),
pg_size_pretty(hypertable_size(table_schema||'.'||table_name)) as pg_size_pretty_ts,
pg_relation_size(quote_ident(table_name))
from
information_schema.tables
where
table_schema = 'public'
order by 3 desc;
- pg_size_pretty(pg_relation_size(quote_ident(table_name))) : postgres 테이블 크기
- pg_size_pretty(hypertable_size(table_schema||'.'||table_name)) as pg_size_pretty_ts : timescale 테이블 크기
반응형
Comments