사용 장비
name | spac |
---|
노트북 | macbook pro m1 1TB 16G |
spring boot | 3.4.1 |
mysql | 9.0.1 |
java | 21 |
사용 코드 일부
public void insert() {
log.info("start performance test");
long startTime = System.currentTimeMillis();
List<Member> members = new ArrayList<>();
for (int i = 0; i < 1000000; i++) {
Member member = Member.signup("test" + i);
members.add(member);
}
performanceRepository.save(members);
long endTime = System.currentTimeMillis();
log.info("total time : {}", endTime - startTime);
}
테스트 결과값
db name | 1건 | 10건 | 100건 | 1,000건 | 10,000건 | 100,000건 |
---|
JDBC | 6ms | 19ms | 150ms | 542ms | 3,224ms | 29,634ms |
Mybatis | 11ms | 31ms | 154ms | 581ms | 4,173ms | 43,943ms |
JPA | 40ms | 90ms | 285ms | 2,033ms | 47,223ms | 3,164,874ms |