3 date: 2019-06-16T18:51:48+02:00
14 Each supported [persistence](/persistence/) API has their own performance characteristics. The following benchmarks try to use the fastest code paths available to execute SQL statements.
18 The common scenarios define what each persistence solution must solve in order to pass the TCK. All benchmarks run through the following benchmarks:
22 - `readComplexRelationship`: Read a complex data relationship.
23 - `readManyToOneRelation`: Reads the one part of a many-to-one relation.
24 - `readMultipleEntities`: Read multiple entities in one go.
25 - `readMultipleEntitiesBasedOnCondition`: Read multiple entities and filter them inside the database.
26 - `readOneToManyRelation`: Reads the many part of a one-to-many relation.
27 - `readSingleEntityByPrimaryKey`: Read a single entity using its primary key.
31 - `writeMultipleEntities`: Writes multiple entities into the database.
32 - `writeSingleEntity`: Writes a new entity into the database.
33 - `updateOneToManyRelation`: Update the one-to-many relationship part of an entity.
34 - `updateManyToOneRelation`: Update the many-to-one relationship part of an entity.
35 - `deleteSingleEntityByPrimaryKey`: Delete a single entity using its primary key.
37 #### Calling Stored Procedures
39 - `callStoredProcedure`: Call a single stored procedure.
41 ## YoSQL Implementations
43 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.
47 In order to run benchmarks for the [EBean](/persistence/ebean/) implementation of `YoSQL` run:
50 # run EBean benchmarks
51 $ mvn --projects yosql-benchmarks/yosql-benchmarks-ebean --also-make --activate-profiles benchmarks verify
54 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/135
58 In order to run benchmarks for the [Fluent JDBC](/persistence/fluent-jdbc/) implementation of `YoSQL` run:
61 # run EBean benchmarks
62 $ mvn --projects yosql-benchmarks/yosql-benchmarks-fluent-jdbc --also-make --activate-profiles benchmarks verify
67 In order to run benchmarks for the [JDBC](/persistence/jdbc/) implementation of `YoSQL` run:
71 $ mvn --projects yosql-benchmarks/yosql-benchmarks-jdbc --also-make --activate-profiles benchmarks verify
73 The [results](https://jmh.morethan.io/?sources=https://yosql.projects.metio.wtf/benchmarks/results/yosql-benchmarks-jdbc-baseline.json,https://yosql.projects.metio.wtf/benchmarks/results/yosql-benchmarks-jdbc-CURRENT.json) 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.
77 In order to run benchmarks for the [JDBI](/persistence/jdbi/) implementation of `YoSQL` run:
81 $ mvn --projects yosql-benchmarks/yosql-benchmarks-jdbi --also-make --activate-profiles benchmarks verify
84 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/136
88 In order to run benchmarks for the [jOOQ](/persistence/jooq/) implementation of `YoSQL` run:
92 $ mvn --projects yosql-benchmarks/yosql-benchmarks-jooq --also-make --activate-profiles benchmarks verify
95 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/137
99 In order to run benchmarks for the [JPA](/persistence/jpa/) implementation of `YoSQL` run:
103 $ mvn --projects yosql-benchmarks/yosql-benchmarks-jpa --also-make --activate-profiles benchmarks verify
106 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/138
110 In order to run benchmarks for the [MyBatis](/persistence/mybatis/) implementation of `YoSQL` run:
114 $ mvn --projects yosql-benchmarks/yosql-benchmarks-mybatis --also-make --activate-profiles benchmarks verify
119 In order to run benchmarks for the [Pyranid](/persistence/pyranid/) implementation of `YoSQL` run:
123 $ mvn --projects yosql-benchmarks/yosql-benchmarks-pyranid --also-make --activate-profiles benchmarks verify
128 In order to run benchmarks for the [R2DBC](/persistence/r2dbc/) implementation of `YoSQL` run:
132 $ mvn --projects yosql-benchmarks/yosql-benchmarks-r2dbc --also-make --activate-profiles benchmarks verify
135 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/139
139 In order to run benchmarks for the [SansOrm](/persistence/sansorm/) implementation of `YoSQL` run:
143 $ mvn --projects yosql-benchmarks/yosql-benchmarks-sansorm --also-make --activate-profiles benchmarks verify
148 In order to run benchmarks for the [Spring-Data JDBC](/persistence/spring-data-jdbc/) implementation of `YoSQL` run:
151 # run Spring-Data JDBC benchmarks
152 $ mvn --projects yosql-benchmarks/yosql-benchmarks-spring-data-jdbc --also-make --activate-profiles benchmarks verify
155 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/140
159 In order to run benchmarks for the [Spring-Data JPA](/persistence/spring-data-jpa/) implementation of `YoSQL` run:
162 # run Spring-Data JDBC benchmarks
163 $ mvn --projects yosql-benchmarks/yosql-benchmarks-spring-data-jpa --also-make --activate-profiles benchmarks verify
166 ### Spring-Data R2DBC
168 In order to run benchmarks for the [Spring-Data R2DBC](/persistence/spring-data-r2dbc/) implementation of `YoSQL` run:
171 # run Spring-Data JDBC benchmarks
172 $ mvn --projects yosql-benchmarks/yosql-benchmarks-spring-data-r2dbc --also-make --activate-profiles benchmarks verify
177 In order to run benchmarks for the [Spring JDBC](/persistence/spring-jdbc/) implementation of `YoSQL` run:
180 # run Spring JDBC benchmarks
181 $ mvn --projects yosql-benchmarks/yosql-benchmarks-spring-jdbc --also-make --activate-profiles benchmarks verify
184 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/141
188 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.
192 In order to run benchmarks for the [EBean](/persistence/ebean/) *only* implementation run:
195 # run EBean benchmarks
196 $ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-ebean --also-make --activate-profiles benchmarks verify
201 In order to run benchmarks for the [JDBI](/persistence/jdbi/) *only* implementation run:
204 # run EBean benchmarks
205 $ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-jdbi --also-make --activate-profiles benchmarks verify
210 In order to run benchmarks for the [jOOQ](/persistence/jooq/) *only* implementation run:
213 # run EBean benchmarks
214 $ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-jooq --also-make --activate-profiles benchmarks verify
219 In order to run benchmarks for the [JPA](/persistence/jpa/) *only* implementation run:
222 # run EBean benchmarks
223 $ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-jpa --also-make --activate-profiles benchmarks verify