# Citus 12: PostgreSQL을 위한 스키마 기반 샤딩

> Clean Markdown view of GeekNews topic #9916. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=9916](https://news.hada.io/topic?id=9916)
- GeekNews Markdown: [https://news.hada.io/topic/9916.md](https://news.hada.io/topic/9916.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2023-07-21T11:04:02+09:00
- Updated: 2023-07-21T11:04:02+09:00
- Original source: [citusdata.com](https://www.citusdata.com/blog/2023/07/18/citus-12-schema-based-sharding-for-postgres/)
- Points: 5
- Comments: 0

## Topic Body

- Citus 12버전부터 별도의 데이터 모델링 단계 없이 스키마 이름 만으로 샤딩을 지원   
  - 멀티테넌트 SaaS, 같은 DB를 이용하는 Microservice 등에 손쉽게 샤딩 적용 가능   
- Citus는 기존에 Row-based 샤딩이었음   
  - 분석 어플리케이션에 최적  
  - 멀티 테넌트에도 사용은 가능했지만, 테이블에 테넌트ID 컬럼을 추가하고 필터,쿼리,포린키 등에서 이를 이용해야 했음   
- 스키마 기반 샤딩은 샤딩하지 않은 PostgreSQL과 비교해서 데이터 모델링 제한이나 특별한 단계가 거의 없음   
  - 테넌트당 스키마를 이용하는 멀티 테넌트 어플리케이션을 쉽게 생성 가능   
  - 조인/포린키 등이 같은 스키마의 테이블에만 적용되어야 한다는 제약은 있으나, 스키마간 트랜잭션은 여전히 동작

## Comments



_No public comments on this page._
