Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: backtony/Backend_Interview_for_Beginner
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: lcomment/Backend_Interview_for_Beginner
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 2, 2024

  1. Update Database.md

    lcomment authored Nov 2, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cfb653c View commit details
Showing with 3 additions and 1 deletion.
  1. +3 −1 Database.md
4 changes: 3 additions & 1 deletion Database.md
Original file line number Diff line number Diff line change
@@ -768,7 +768,8 @@ DB 레플리케이션은 __DB 서버와 DB 스토리지를 다중화하는 방
-----------------------

+ __큰 Table이나 인덱스를 관리하기 쉬운 단위로 분리하는 방식__
+ 예를 들어, 사람이라는 테이블이 너무 커지게 되면서 사람을 북유럽인, 아시아인, 서유럽인 이렇게 테이블로 분리하는 것이라고 볼 수 있다.
+ 테이블을 컬럼 단위로 나눈다.
+ 예를 들어, 유저 정보라는 테이블이 너무 커지게 되면서 기본 정보, 추가 정보 등으로 분리하는 것이라고 볼 수 있다.
+ 장점
- Insert 시 분리된 파티션으로 분산시켜 경합을 줄임
- 읽기/쓰기 향상
@@ -796,6 +797,7 @@ DB 레플리케이션은 __DB 서버와 DB 스토리지를 다중화하는 방


+ __같은 테이블 스키마를 가진 데이터를 다수의 데이터베이스에 분산하여 저장하는 방식__
+ 예를 들어, 사람이라는 테이블이 너무 커지게 되면서 사람을 북유럽인, 아시아인, 서유럽인 이렇게 테이블로 분리하는 것이라고 볼 수 있다.
+ 데이터를 잘 분산시키기 위해 고려해야할 것이 Shard Key이고 이를 정하는 방식으로 Hash Sharding, Dynamic Sharding, Entity Group 방식이 있다.
+ 샤딩은 복잡도가 매우 높아지므로 다른 방식을 우선적으로 고려해야 한다.