배치사이즈 조정 BATCH_SIZE = 60000;

This commit is contained in:
hylee 2024-07-29 17:35:14 +09:00
parent a776b1fff2
commit a806de33b9
2 changed files with 20 additions and 23 deletions

View File

@ -59,7 +59,7 @@ public class AddrServiceImpl extends EgovAbstractServiceImpl implements AddrSer
private static final String PHONE_REGEX = "^(01[016789]-?\\d{3,4}-?\\d{4})$";
private static final Pattern PHONE_PATTERN = Pattern.compile(PHONE_REGEX);
private static final Charset EUC_KR = Charset.forName("EUC-KR");
private static final int BATCH_SIZE = 100000;
private static final int BATCH_SIZE = 60000;
// private static final int MAX_ADDR_CNT = 500000;
//임시 500만개
private static final int MAX_ADDR_CNT = 5000000;
@ -469,26 +469,26 @@ public class AddrServiceImpl extends EgovAbstractServiceImpl implements AddrSer
startTime = System.currentTimeMillis();
System.out.println("addrListVO.size() : "+ addrListVO.size());
if(addrListVO.size() > 0) {
// 등록
// Batch insert
try {
batchInsertAddrList(addrListVO);
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
return new StatusResponse(
HttpStatus.BAD_REQUEST
, "배치오류"
, LocalDateTime.now()
);
}
// addrDAO.insertAddrList(addrListVO);
}
try {
if(addrListVO.size() > 0) {
// 등록
// Batch insert
batchInsertAddrList(addrListVO);
// addrDAO.insertAddrList(addrListVO);
}
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
return new StatusResponse(
HttpStatus.BAD_REQUEST
, "배치오류"
, LocalDateTime.now()
);
}
endTime = System.currentTimeMillis();
executionTime = (endTime - startTime) / 1000.0;
System.out.println("INSERT Execution time: " + executionTime + " seconds");

View File

@ -478,9 +478,6 @@ function setSenderList_advc(){
}
},
error: function (e) {
//로딩창 hide
$('.loading_layer').removeClass('active');
alert("저장에 실패하였습니다.");
alert("ERROR : " + JSON.stringify(e));
},