Api: π N+1 λ¬Έμ κ°μ ν μ€νΈμ κ°νμ μ€ν¨λ¬Έμ μμ #122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
μμ μ΄μ
CI νκ²½μμ
SpendingSearchServiceTest.java
μ κ°νμ ν μ€νΈ μ€ν¨κ° νμΈλμ΄ μ΄μ μ²΄ν¬ λ° μμ μ νμμ± λλ.μμ μ¬ν
μλ¬ λ°μ μμΈ
μμΈμ μΌλ¨ μΈλν€ μ μ½μ‘°κ±΄μ μλ°μ΄μμ΅λλ€.
Spending
κ°μ²΄κ°SpendingCustomCategory
ν μ΄λΈμ μ‘΄μ¬νμ§ μλ idλ₯Ό spending_custom_categoryνλμ κ°μΌλ‘ κ°μ§κ² λλ©΄μ μλ°λμλ κ²μ΄μμ΅λλ€.λ¬Έμ λλ λΆλΆ
SpendingSearchServiceTest.java
μμ ν μ€νΈλ₯Ό μν΄ μ»€μ€ν μΉ΄ν κ³ λ¦¬λ₯Ό κ°μ§λSpending
κ°μ²΄λ€μ bulkInsertνλ κ³Όμ μ΄ μ‘΄μ¬νλλ°, μ΄λ₯Ό μννκΈ° μν΄μλ λ¨Όμ 컀μ€ν μΉ΄ν κ³ λ¦¬λ€μ DBμ μμ±ν΄ μ£Όμ΄μΌ ν¨.SpendingCustomCategoryFixture
μμ 컀μ€ν μΉ΄ν κ³ λ¦¬λ₯Ό capacity κ° λ§νΌ DBμ bulkInsert ν¨.Spending
λ€μ DBμ μ μ₯ν¨. μ΄λ CustomCategory νλμ λ€μ΄κ° id(μΈλν€) κ°μ {1~capacity}μ¬μ΄μμ λλ€μΌλ‘ λ½μμ.1 + FLOOR(RAND() * %d)
1~capacity μ¬μ΄μ κ°λ€μμ λλ€μΌλ‘ λ½λ κ³Όμ μ΄ λ¬΄μμΈκ° μλͺ» λ κ² κ°μλ°, μ κ° μ§μ μ°μ΄λ³Έ κ²°κ³Ό μλͺ»λ μκ° μμ΅λλ€...
λΆλͺ ν capacity κ°μ 컀μ€ν μΉ΄ν κ³ λ¦¬λ€μ΄ μ μ₯λκ³ ,
Spending
κ°μ²΄λ€μ μμ±ν λλ 1~capacity μ¬μ΄μ idλ₯Ό μ¬μ©νλλ° μ¬κΈ°μ μλ idλ₯Ό μ°Έμ‘°ν μΌμ΄ μλλ° λ§μ΄μ£ .. (μλ§ μ΄κ±΄ μ λ²μ μΈκΈν λ³λ ¬μ€νκ³Ό 무μμΈκ° κ΄λ ¨μ΄ μλ κ² κ°μ΅λλ€..)κ²°κ΅ κ·Έλμ μ λ κΈ°μ‘΄ μ½λμ λ¬Έμ μ μ μ°Ύμ§ λͺ»νμ΅λλ€....λ§!
μΌλ¨μ μ μ @psychology50 λμ΄ νλ² μΈκΈν΄μ£Όμ ¨λ κ² μ²λΌ λλ€μ΄ νμμλ κ³³μ κ΅³μ΄ λλ€μ λ£μκ²μ΄ νκ·Όμ΄λΌκ³ μκ°ν΄
fetchν μ€νΈμ λͺ©μ μ±μ μ μ§ν¨κ³Ό λμμ λλ€μΌλ‘ customCategoryIdλ₯Ό λ£μ΄μ£Όλ λΆλΆμ λ³κ²½ν΄ μΈλν€ μ μ½μ‘°κ±΄μ΄ μλ°λ μ¬μ§λ₯Ό μμ ν μ κ±°νμ΅λλ€.
κ·Έμλ°λΌ
bulkInsertSpending
λ©μλ μ¬μ©νλ λ°©λ²μ΄ λ³κ²½λμκ³ , μ΄λ javaDocμΌλ‘ λͺ μν΄ λμμ΅λλ€.리뷰μ΄κ° μ€μ μ μΌλ‘ νμΈν΄μΌ νλ λΆλΆ
SpendingFixture.java
μμ bulkInsertSpending λ©μλλ§ λ΄μ£Όμλ©΄ λ©λλ€.μΌλ¨ μ΄κ²λ κ°μ₯ ν¬κ² μμ¬λλ λΆλΆμ μ κ±°ν κ²μΌ λΏμ΄μ§, λ‘컬μμλ μ€ν¨νλμΌ μμ΄ κ³μ μ±κ³΅ν΄μ λ³ν© ν μ§μΌ 보μμΌ ν λ― ν©λλ€.... π’
#119 PRμ λ³Έ PR mergeμ΄νμ mergeνκ² μ΅λλ€~~
λ°κ²¬ν μ΄μ
X