From d85d6f0d43dfbb8f414df86843177977d45faa0d Mon Sep 17 00:00:00 2001 From: Gavin King Date: Wed, 6 Aug 2025 12:06:35 +1000 Subject: [PATCH 1/2] mention 'org.hibernate.orm:hibernate-hikaricp' in doc --- documentation/src/main/asciidoc/introduction/Tuning.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/documentation/src/main/asciidoc/introduction/Tuning.adoc b/documentation/src/main/asciidoc/introduction/Tuning.adoc index 6849c0ffc3a3..05b442c65bdb 100644 --- a/documentation/src/main/asciidoc/introduction/Tuning.adoc +++ b/documentation/src/main/asciidoc/introduction/Tuning.adoc @@ -92,7 +92,10 @@ The following settings are common to all connection pools supported by Hibernate | link:{doc-javadoc-url}/org/hibernate/cfg/JdbcSettings.html#ISOLATION[`hibernate.connection.isolation`] | The default transaction isolation level |=== -A popular alternative to Agroal is HikariCP. +:hikaricp: https://github.com/brettwooldridge/HikariCP + +A popular alternative to Agroal is {hikaricp}[HikariCP]. +Integration with HikariCP is provided by the module `org.hibernate.orm:hibernate-hikaricp`. Its settings are enumerated by link:{doc-javadoc-url}/org/hibernate/cfg/HikariCPSettings.html[`HikariCPSettings`]. .Container-managed datasources From 403f7190c0e06657073a1b370ff4fdc7dc524300 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Wed, 6 Aug 2025 12:47:56 +1000 Subject: [PATCH 2/2] add a tip about fetch size and MySQL --- documentation/src/main/asciidoc/introduction/Tuning.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/documentation/src/main/asciidoc/introduction/Tuning.adoc b/documentation/src/main/asciidoc/introduction/Tuning.adoc index 05b442c65bdb..cb8397668da0 100644 --- a/documentation/src/main/asciidoc/introduction/Tuning.adoc +++ b/documentation/src/main/asciidoc/introduction/Tuning.adoc @@ -128,6 +128,12 @@ The Oracle JDBC driver defaults to a JDBC fetch size of 10. You should _always_ set `hibernate.jdbc.fetch_size` explicitly if you're using Oracle, or, even better, specify the parameter `defaultRowPrefetch` in the JDBC connection URL. ==== +[TIP] +==== +The MySQL JDBC driver ignores the fetch size by default. +The JDBC connection property `useCursorFetch=true` enables the use of server-side cursors, and with this setting the driver respects the fetch size. +==== + [[statement-batching]] === Enabling statement batching