Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batch insert, 벌크 업데이트, 벌크 딜리트 적용시 문제 #91

Open
allnight5 opened this issue Apr 3, 2023 · 1 comment
Open
Labels
기능추가 새로운 기능 추가하고싶을때 성능개선 성능개선하고싶다이 이거야~!

Comments

@allnight5
Copy link
Collaborator

List<User> userList = new ArrayList<>();
for (int i = 1; i < 50; i++) {
  User user = User.builder()
          .nickName("member" + i)
          .email("member" + i + "@google.com")
          .phoneNumber("01033334444")
          .password(passwordEncoder.encode("member1234"))
          .username("member" + i)
          .role(UserRoleEnum.MEMBER)
          .build();
  userList.add(user);
}
userRepository.saveAll(userList);

알맞게 했는데 작동하지 않음 그이유가 무엇일까?

데이터 베이스마다 일괄 처리가 비활성화되어 있는 경우도 있습니다.
이 경우, 데이터베이스 설정을 수정하여 일괄 처리를 활성화해주어야 합니다.

스프링에서는
.yml에서 설정을 바꿔주면 됩니다.

@allnight5 allnight5 changed the title batch insert 적용시 문제 batch insert, 벌크 업데이트, 벌크 딜리트 적용시 문제 Apr 3, 2023
@wonizizi89
Copy link
Collaborator

또 하나 배워갑니다. ㅎ 아직 제 로직에는 벌크업데이트 , 딜리트 적용하지 못했지만 ㅎㅎ 추후 하면서 효근님이 알려주신 yml 설정 수정해보겠습니다. 수고하셨습니다 .

@allnight5 allnight5 added 성능개선 성능개선하고싶다이 이거야~! 기능추가 새로운 기능 추가하고싶을때 labels Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
기능추가 새로운 기능 추가하고싶을때 성능개선 성능개선하고싶다이 이거야~!
Projects
None yet
Development

No branches or pull requests

2 participants