Database Access

Talks about: , and

Each supported persistence API has their own performance characteristics. The following benchmarks try to use the fastest code paths available to execute SQL statements.

Common Scenarios

The common scenarios define what each persistence solution must solve in order to pass the TCK. All benchmarks run through the following benchmarks:

Reading Data

Writing Data

Calling Stored Procedures

YoSQL Implementations

In order to select the best matching persistence API for your project, performance might be taken into consideration. In general, we recommend to use whatever persistence API is already used in your project in order to minimize the number of dependencies.

EBean

In order to run benchmarks for the EBean implementation of YoSQL run:

# run EBean benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-ebean --also-make --activate-profiles benchmarks verify

*WORK IN PROGRESS: https://github.com/metio/yosql/issues/135

Fluent JDBC

In order to run benchmarks for the Fluent JDBC implementation of YoSQL run:

# run EBean benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-fluent-jdbc --also-make --activate-profiles benchmarks verify

JDBC

In order to run benchmarks for the JDBC implementation of YoSQL run:

# run JDBC benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-jdbc --also-make --activate-profiles benchmarks verify

The results are measured in microseconds. All available logging implementation are tested with their maximal output configuration in order to gauge how much overhead each implementation causes on top of the no-op implementation without any logging statements.

JDBI

In order to run benchmarks for the JDBI implementation of YoSQL run:

# run JDBI benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-jdbi --also-make --activate-profiles benchmarks verify

*WORK IN PROGRESS: https://github.com/metio/yosql/issues/136

jOOQ

In order to run benchmarks for the jOOQ implementation of YoSQL run:

# run jOOQ benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-jooq --also-make --activate-profiles benchmarks verify

*WORK IN PROGRESS: https://github.com/metio/yosql/issues/137

JPA

In order to run benchmarks for the JPA implementation of YoSQL run:

# run JPA benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-jpa --also-make --activate-profiles benchmarks verify

*WORK IN PROGRESS: https://github.com/metio/yosql/issues/138

MyBatis

In order to run benchmarks for the MyBatis implementation of YoSQL run:

# run JPA benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-mybatis --also-make --activate-profiles benchmarks verify

Pyranid

In order to run benchmarks for the Pyranid implementation of YoSQL run:

# run JPA benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-pyranid --also-make --activate-profiles benchmarks verify

R2DBC

In order to run benchmarks for the R2DBC implementation of YoSQL run:

# run JPA benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-r2dbc --also-make --activate-profiles benchmarks verify

*WORK IN PROGRESS: https://github.com/metio/yosql/issues/139

SansOrm

In order to run benchmarks for the SansOrm implementation of YoSQL run:

# run JPA benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-sansorm --also-make --activate-profiles benchmarks verify

Spring-Data JDBC

In order to run benchmarks for the Spring-Data JDBC implementation of YoSQL run:

# run Spring-Data JDBC benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-spring-data-jdbc --also-make --activate-profiles benchmarks verify

*WORK IN PROGRESS: https://github.com/metio/yosql/issues/140

Spring-Data JPA

In order to run benchmarks for the Spring-Data JPA implementation of YoSQL run:

# run Spring-Data JDBC benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-spring-data-jpa --also-make --activate-profiles benchmarks verify

Spring-Data R2DBC

In order to run benchmarks for the Spring-Data R2DBC implementation of YoSQL run:

# run Spring-Data JDBC benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-spring-data-r2dbc --also-make --activate-profiles benchmarks verify

Spring JDBC

In order to run benchmarks for the Spring JDBC implementation of YoSQL run:

# run Spring JDBC benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-spring-jdbc --also-make --activate-profiles benchmarks verify

*WORK IN PROGRESS: https://github.com/metio/yosql/issues/141

Other Solutions

In order to compare a solution entirely based on YoSQL against other persistence solutions, the following set of benchmarks was created. None of them use Yosql and solely use own native persistence API itself.

EBean

In order to run benchmarks for the EBean only implementation run:

# run EBean benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-ebean --also-make --activate-profiles benchmarks verify

JDBI

In order to run benchmarks for the JDBI only implementation run:

# run EBean benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-jdbi --also-make --activate-profiles benchmarks verify

jOOQ

In order to run benchmarks for the jOOQ only implementation run:

# run EBean benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-jooq --also-make --activate-profiles benchmarks verify

JPA

In order to run benchmarks for the JPA only implementation run:

# run EBean benchmarks
$ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-jpa --also-make --activate-profiles benchmarks verify