문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
java:hibernate:performance [2019/01/02 13:11] kwon37xi |
java:hibernate:performance [2020/08/07 14:07] kwon37xi [참조 문서] |
||
---|---|---|---|
줄 19: | 줄 19: | ||
하지만 '' | 하지만 '' | ||
- | * '' | + | * '' |
- | * OneToOne Eager 에 대해서는 작동하지 않았다. | + | * OneToOne, ManyToOne |
+ | * 지나치게 큰 값을 설정하지 말아야 한다. 30개 정도가 적당해 보이며, 쿼리 실행시간이 수십 밀리세컨드 이내로 끝날 수준으로 정하는게 좋다. | ||
===== hibernate.jdbc.fetch_size ===== | ===== hibernate.jdbc.fetch_size ===== | ||
줄 28: | 줄 29: | ||
===== hibernate.jdbc.batch_size ===== | ===== hibernate.jdbc.batch_size ===== | ||
- | TBD | + | * [[java: |
+ | ===== hibernate.query.in_clause_parameter_padding=true ===== | ||
+ | * Hibernate 5.2.18 이후 버전 '' | ||
+ | * '' | ||
+ | * [[https:// | ||
+ | * 위 옵션을 켜지 않으면, '' | ||
+ | * 또한 RDBMS 의 경우 그 자체 execution plan cache 가 있는데, 이 옵션을 켜면 그에 대한 hit 율도 높아지게 된다. | ||
+ | ===== Hibernate Query Plan Cache ===== | ||
+ | * [[https:// | ||
+ | * '' | ||
+ | * 별문제 없으면 변경하지 말 것. | ||
===== autoCommit 을 꺼서 성능 향상시키기 ===== | ===== autoCommit 을 꺼서 성능 향상시키기 ===== | ||
* Connection Pool 의 '' | * Connection Pool 의 '' | ||
* [[https:// | * [[https:// | ||
- | * DBCP 설정의 '' | + | * [[https:// |
- | * '' | + | * 커넥션 풀 설정의 '' |
+ | * '' | ||
+ | * [[springframework: | ||
+ | * [[https:// | ||
+ | * '' | ||
+ | if (!vendorProperties.containsKey(PROVIDER_DISABLES_AUTOCOMMIT)) { | ||
+ | configureProviderDisablesAutocommit(vendorProperties); | ||
+ | } | ||
+ | |||
+ | ... | ||
+ | |||
+ | if (isDataSourceAutoCommitDisabled() && !isJta()) { | ||
+ | vendorProperties.put(PROVIDER_DISABLES_AUTOCOMMIT, | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | > in Hibernate 5.2.10, we introduced the hibernate.connection.provider_disables_autocommit configuration property which tells Hibernate that the underlying JDBC Connections already disabled the auto-commit mode. | ||
줄 56: | 줄 83: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |