File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
documentation/src/main/asciidoc/introduction Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -490,7 +490,7 @@ These settings really help when troubleshooting the generated SQL statements.
490
490
| `hibernate.highlight_sql` | If `true`, log SQL with syntax highlighting via ANSI escape codes
491
491
|===
492
492
493
- Alternatively, you can enable debug -level logging for the category `org.hibernate.SQL` using your preferred SLF4J logging implementation.
493
+ Alternatively, you can enable ``DEBUG`` -level logging for the category `org.hibernate.SQL` using your preferred SLF4J logging implementation.
494
494
495
495
For example, if you're using Log4J 2 (as above in <<optional-dependencies>>), add these lines to your `log4j2.properties` file:
496
496
@@ -507,6 +507,9 @@ logger.jdbc-bind.level=trace
507
507
logger.jdbc-extract.name=org.hibernate.orm.jdbc.extract
508
508
logger.jdbc-extract.level=trace
509
509
510
+ # JDBC batching
511
+ logger.jdbc-batch.name=org.hibernate.orm.jdbc.batch
512
+ logger.jdbc-batch.level=trace
510
513
----
511
514
512
515
SQL logging respects the settings `hibernate.format_sql` and `hibernate.highlight_sql`, so we don't miss out on the pretty formatting and highlighting.
Original file line number Diff line number Diff line change @@ -141,6 +141,8 @@ All we need to do is set a single property:
141
141
| link:{doc-javadoc-url}/org/hibernate/cfg/BatchSettings.html#STATEMENT_BATCH_SIZE[`hibernate.jdbc.batch_size`] | Maximum batch size for SQL statement batching | `setJdbcBatchSize()`
142
142
|===
143
143
144
+ To confirm that statement batching is working, enable ``TRACE``-level logging for the category `org.hibernate.orm.jdbc.batch`.
145
+
144
146
That said, batching is rarely the most convenient or most efficient way to update or delete many rows at once.
145
147
146
148
[TIP]
You can’t perform that action at this time.
0 commit comments