remove ilo run command file
[yosql.git] / yosql-website / content / benchmarks / db-access.md
blob0720fc70308cc326c1dd45e0f8cf566af5d28cce
1 ---
2 title: Database Access
3 date: 2019-06-16T18:51:48+02:00
4 menu:
5   main:
6     parent: Benchmarks
7 categories:
8   - Benchmarks 
9 tags:
10   - database
11   - access
12 ---
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.
16 ### Common Scenarios
18 The common scenarios define what each persistence solution must solve in order to pass the TCK. All benchmarks run through the following benchmarks:
20 #### Reading Data
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.
29 #### Writing Data
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.
45 ### EBean
47 In order to run benchmarks for the  [EBean](/persistence/ebean/) implementation of `YoSQL` run:
49 ```shell
50 # run EBean benchmarks
51 $ mvn --projects yosql-benchmarks/yosql-benchmarks-ebean --also-make --activate-profiles benchmarks verify
52 ```
54 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/135
56 ### Fluent JDBC
58 In order to run benchmarks for the  [Fluent JDBC](/persistence/fluent-jdbc/) implementation of `YoSQL` run:
60 ```shell
61 # run EBean benchmarks
62 $ mvn --projects yosql-benchmarks/yosql-benchmarks-fluent-jdbc --also-make --activate-profiles benchmarks verify
63 ```
65 ### JDBC
67 In order to run benchmarks for the  [JDBC](/persistence/jdbc/) implementation of `YoSQL` run:
69 ```shell
70 # run JDBC benchmarks
71 $ mvn --projects yosql-benchmarks/yosql-benchmarks-jdbc --also-make --activate-profiles benchmarks verify
72 ```
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.
75 ### JDBI
77 In order to run benchmarks for the  [JDBI](/persistence/jdbi/) implementation of `YoSQL` run:
79 ```shell
80 # run JDBI benchmarks
81 $ mvn --projects yosql-benchmarks/yosql-benchmarks-jdbi --also-make --activate-profiles benchmarks verify
82 ```
84 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/136
86 ### jOOQ
88 In order to run benchmarks for the  [jOOQ](/persistence/jooq/) implementation of `YoSQL` run:
90 ```shell
91 # run jOOQ benchmarks
92 $ mvn --projects yosql-benchmarks/yosql-benchmarks-jooq --also-make --activate-profiles benchmarks verify
93 ```
95 **WORK IN PROGRESS*: https://github.com/metio/yosql/issues/137
97 ### JPA
99 In order to run benchmarks for the  [JPA](/persistence/jpa/) implementation of `YoSQL` run:
101 ```shell
102 # run JPA benchmarks
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
108 ### MyBatis
110 In order to run benchmarks for the  [MyBatis](/persistence/mybatis/) implementation of `YoSQL` run:
112 ```shell
113 # run JPA benchmarks
114 $ mvn --projects yosql-benchmarks/yosql-benchmarks-mybatis --also-make --activate-profiles benchmarks verify
117 ### Pyranid
119 In order to run benchmarks for the  [Pyranid](/persistence/pyranid/) implementation of `YoSQL` run:
121 ```shell
122 # run JPA benchmarks
123 $ mvn --projects yosql-benchmarks/yosql-benchmarks-pyranid --also-make --activate-profiles benchmarks verify
126 ### R2DBC
128 In order to run benchmarks for the  [R2DBC](/persistence/r2dbc/) implementation of `YoSQL` run:
130 ```shell
131 # run JPA benchmarks
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
137 ### SansOrm
139 In order to run benchmarks for the  [SansOrm](/persistence/sansorm/) implementation of `YoSQL` run:
141 ```shell
142 # run JPA benchmarks
143 $ mvn --projects yosql-benchmarks/yosql-benchmarks-sansorm --also-make --activate-profiles benchmarks verify
146 ### Spring-Data JDBC
148 In order to run benchmarks for the  [Spring-Data JDBC](/persistence/spring-data-jdbc/) implementation of `YoSQL` run:
150 ```shell
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
157 ### Spring-Data JPA
159 In order to run benchmarks for the  [Spring-Data JPA](/persistence/spring-data-jpa/) implementation of `YoSQL` run:
161 ```shell
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:
170 ```shell
171 # run Spring-Data JDBC benchmarks
172 $ mvn --projects yosql-benchmarks/yosql-benchmarks-spring-data-r2dbc --also-make --activate-profiles benchmarks verify
175 ### Spring JDBC
177 In order to run benchmarks for the  [Spring JDBC](/persistence/spring-jdbc/) implementation of `YoSQL` run:
179 ```shell
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
186 ## Other Solutions
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.
190 ### EBean
192 In order to run benchmarks for the  [EBean](/persistence/ebean/) *only* implementation run:
194 ```shell
195 # run EBean benchmarks
196 $ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-ebean --also-make --activate-profiles benchmarks verify
199 ### JDBI
201 In order to run benchmarks for the  [JDBI](/persistence/jdbi/) *only* implementation run:
203 ```shell
204 # run EBean benchmarks
205 $ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-jdbi --also-make --activate-profiles benchmarks verify
208 ### jOOQ
210 In order to run benchmarks for the  [jOOQ](/persistence/jooq/) *only* implementation run:
212 ```shell
213 # run EBean benchmarks
214 $ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-jooq --also-make --activate-profiles benchmarks verify
217 ### JPA
219 In order to run benchmarks for the  [JPA](/persistence/jpa/) *only* implementation run:
221 ```shell
222 # run EBean benchmarks
223 $ mvn --projects yosql-benchmarks/yosql-benchmarks-vs-jpa --also-make --activate-profiles benchmarks verify