일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
31 |
Tags
- postgres
- DB
- JS
- 아틀라시안
- 데이터베이스
- DATABASE
- 자바스크립트
- Atlassian
- 설정
- install
- python
- 파이썬
- 우분투
- javascript
- Windows
- 윈도우
- Linux
- 설치
- script
- 스크립트
- ubuntu
- java
- hamonikr
- node
- PostgreSQL
- 3.0
- 노드
- 하모니카
- 리눅스
- 자바
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