Skip to content

@ExpectJdbcBatching

Jean Bisutti edited this page Nov 3, 2021 · 8 revisions

Verifies that insert, delete, and update statements are processed through JDBC batches of batchSize elements.

JDBC roundtrips can dramatically impact application performance. Batching of inserts, updates, and deletes statements allow us to reduce the roundtrip number.

You may sometimes think that you are using JDBC batching, but in fact, you are not: Article 1, Article 2.

πŸ”§ Elements

Name Type Meaning Default value
batchSize int JDBC batch size -

batchSize is optional. With no given batch size value, the annotation checks that insert, delete, and update statements are processed through JDBC batches without verifying the batch size.

A 0 batch size means that JDBC batching is disabled.

πŸ”Ž Example

    @ExpectJdbcBatching(batchSize = 30)

Annotations

πŸ‘‰ Β Core

πŸ‘‰ Β JVM

πŸ‘‰ Β SQL

πŸ‘‰ Β Scopes

πŸ‘‰ Β Create an annotation

Supported frameworks

πŸ‘‰ Β JUnit 4

πŸ‘‰ Β JUnit 5

πŸ‘‰ Β TestNG

πŸ‘‰ Β Spring

How to

πŸ‘‰ Β Detect and fix N+1 SELECT

Project examples

πŸ‘‰ Β Maven performance

πŸ‘‰ Β Spring Boot - JUnit 4

πŸ‘‰ Β Spring Boot - JUnit 5

πŸ‘‰ Β Micronaut Data - JUnit 5

πŸ‘‰ Β Micronaut - Spring - JUnit 5

πŸ‘‰ Β Quarkus - JUnit 5

Miscellaneous

πŸ‘‰ Β FAQ

πŸ‘‰ Β QuickPerf code

Clone this wiki locally