Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- Data Structure
- Vue.js
- 코테
- Priority Queue
- boj
- DFS
- 알고리듬
- SQL
- GitHub
- 모의SW역량테스트
- SWEA
- JavaScript
- 알고리즘
- BFS
- 구현
- aws
- Python
- CSV
- programmers
- 코딩테스트
- Bruth Force
- hash table
- Linked list
- django
- Algorithm
- Back tracking
- gpdb
- spring boot
- Trie
- 시뮬레이션
Archives
- Today
- Total
hotamul의 개발 이야기
[GPDB] check distributed key about all tables 본문
SELECT
n.nspname as schemaname,
c.relname as tablename,
pg_get_table_distributedby(c.oid) distributedby,
case c.relstorage
when 'a' then ' append-optimized'
when 'c' then 'column-oriented'
when 'h' then 'heap'
when 'v' then 'virtual'
when 'x' then 'external table'
end as "data storage mode"
FROM pg_class as c
INNER JOIN pg_namespace as n
ON c.relnamespace = n.oid
AND nspname = '<스키마 명>'
ORDER BY n.nspname, c.relname ;
Example SQL
SELECT
n.nspname as schemaname,
c.relname as tablename,
pg_get_table_distributedby(c.oid) distributedby,
case c.relstorage
when 'a' then ' append-optimized'
when 'c' then 'column-oriented'
when 'h' then 'heap'
when 'v' then 'virtual'
when 'x' then 'external table'
end as "data storage mode"
FROM pg_class as c
INNER JOIN pg_namespace as n
ON c.relnamespace = n.oid
AND nspname = 'training'
ORDER BY n.nspname, c.relname ;
출력 결과
schemaname tablename distributedby "data storage mode"
training boys_ao DISTRIBUTED BY (id) heap
training d_airlines DISTRIBUTED BY (airlineid) heap
training d_airports DISTRIBUTED BY (airport_code) heap
training d_cancellation_codes DISTRIBUTED BY (cancel_code) heap
training d_delay_groups DISTRIBUTED BY (delay_group_code) heap
...'dev > Greenplum DB' 카테고리의 다른 글
| [GPDB] 마지막 Vacuum, analyze 작업 시간 확인 (0) | 2022.12.16 |
|---|---|
| [GPDB] Query Profiling (Visualization) (0) | 2022.12.16 |
| [GPDB] delete 할 때 deleted rows 데이터 확인하기 (0) | 2022.12.15 |
| [GPDB] Exteranl Table/COPY error 확인 방법 (0) | 2022.12.15 |
| [GPDB] Greenplum Command Center 실행 (1) | 2022.12.14 |
Comments