JPA GenerationType Insert Benchmark On PostgreSQL
文章目录
- provider : springboot 2.0 (hibernate 5.2.14)
- insert 100 users per thread :
save(1)
× 100 - batch :
saveAll(10)
× 10 - optimizer : default(50)
- source code : olOwOlo/generation-type-benchmark
APPENDIX
16 threads
Benchmark | Mode | Cnt | Score | Error | Units |
---|---|---|---|---|---|
GenerationTypeBenchmark.identity | ss | 30 | 0.805 | ± 0.013 | s/op |
GenerationTypeBenchmark.identityBatch | ss | 30 | 0.404 | ± 0.097 | s/op |
GenerationTypeBenchmark.sequence | ss | 30 | 1.084 | ± 0.011 | s/op |
GenerationTypeBenchmark.sequenceOptimizer | ss | 30 | 0.858 | ± 0.011 | s/op |
GenerationTypeBenchmark.sequenceBatch | ss | 30 | 0.417 | ± 0.093 | s/op |
GenerationTypeBenchmark.sequenceOptimizerBatch | ss | 30 | 0.193 | ± 0.064 | s/op |
GenerationTypeBenchmark.table | ss | 5 | 6.573 | ± 1.118 | s/op |
GenerationTypeBenchmark.tableOptimizer | ss | 30 | 0.936 | ± 0.016 | s/op |
GenerationTypeBenchmark.tableBatch | ss | 5 | 5.097 | ± 0.230 | s/op |
GenerationTypeBenchmark.tableOptimizerBatch | ss | 30 | 0.257 | ± 0.048 | s/op |
8 threads
Benchmark | Mode | Cnt | Score | Error | Units |
---|---|---|---|---|---|
GenerationTypeBenchmark.identity | ss | 30 | 0.607 | ± 0.077 | s/op |
GenerationTypeBenchmark.identityBatch | ss | 30 | 0.274 | ± 0.067 | s/op |
GenerationTypeBenchmark.sequence | ss | 30 | 0.767 | ± 0.032 | s/op |
GenerationTypeBenchmark.sequenceOptimizer | ss | 30 | 0.633 | ± 0.095 | s/op |
GenerationTypeBenchmark.sequenceBatch | ss | 30 | 0.252 | ± 0.032 | s/op |
GenerationTypeBenchmark.sequenceOptimizerBatch | ss | 30 | 0.123 | ± 0.029 | s/op |
GenerationTypeBenchmark.table | ss | 5 | 3.260 | ± 0.861 | s/op |
GenerationTypeBenchmark.tableOptimizer | ss | 30 | 0.643 | ± 0.017 | s/op |
GenerationTypeBenchmark.tableBatch | ss | 5 | 2.409 | ± 0.417 | s/op |
GenerationTypeBenchmark.tableOptimizerBatch | ss | 30 | 0.138 | ± 0.026 | s/op |
4 threads
Benchmark | Mode | Cnt | Score | Error | Units |
---|---|---|---|---|---|
GenerationTypeBenchmark.identity | ss | 30 | 0.548 | ± 0.151 | s/op |
GenerationTypeBenchmark.identityBatch | ss | 30 | 0.218 | ± 0.058 | s/op |
GenerationTypeBenchmark.sequence | ss | 30 | 0.670 | ± 0.151 | s/op |
GenerationTypeBenchmark.sequenceOptimizer | ss | 30 | 0.537 | ± 0.114 | s/op |
GenerationTypeBenchmark.sequenceBatch | ss | 30 | 0.204 | ± 0.040 | s/op |
GenerationTypeBenchmark.sequenceOptimizerBatch | ss | 30 | 0.095 | ± 0.026 | s/op |
GenerationTypeBenchmark.table | ss | 5 | 1.454 | ± 0.288 | s/op |
GenerationTypeBenchmark.tableOptimizer | ss | 30 | 0.547 | ± 0.123 | s/op |
GenerationTypeBenchmark.tableBatch | ss | 5 | 1.101 | ± 0.070 | s/op |
GenerationTypeBenchmark.tableOptimizerBatch | ss | 30 | 0.101 | ± 0.018 | s/op |
2 threads
Benchmark | Mode | Cnt | Score | Error | Units |
---|---|---|---|---|---|
GenerationTypeBenchmark.identity | ss | 30 | 0.369 | ± 0.038 | s/op |
GenerationTypeBenchmark.identityBatch | ss | 30 | 0.143 | ± 0.020 | s/op |
GenerationTypeBenchmark.sequence | ss | 30 | 0.476 | ± 0.051 | s/op |
GenerationTypeBenchmark.sequenceOptimizer | ss | 30 | 0.403 | ± 0.044 | s/op |
GenerationTypeBenchmark.sequenceBatch | ss | 30 | 0.164 | ± 0.028 | s/op |
GenerationTypeBenchmark.sequenceOptimizerBatch | ss | 30 | 0.071 | ± 0.012 | s/op |
GenerationTypeBenchmark.table | ss | 5 | 0.833 | ± 0.234 | s/op |
GenerationTypeBenchmark.tableOptimizer | ss | 30 | 0.408 | ± 0.047 | s/op |
GenerationTypeBenchmark.tableBatch | ss | 5 | 0.576 | ± 0.135 | s/op |
GenerationTypeBenchmark.tableOptimizerBatch | ss | 30 | 0.085 | ± 0.021 | s/op |
1 threads
Benchmark | Mode | Cnt | Score | Error | Units |
---|---|---|---|---|---|
GenerationTypeBenchmark.identity | ss | 30 | 0.280 | ± 0.018 | s/op |
GenerationTypeBenchmark.identityBatch | ss | 30 | 0.105 | ± 0.010 | s/op |
GenerationTypeBenchmark.sequence | ss | 30 | 0.354 | ± 0.024 | s/op |
GenerationTypeBenchmark.sequenceOptimizer | ss | 30 | 0.294 | ± 0.017 | s/op |
GenerationTypeBenchmark.sequenceBatch | ss | 30 | 0.104 | ± 0.009 | s/op |
GenerationTypeBenchmark.sequenceOptimizerBatch | ss | 30 | 0.044 | ± 0.004 | s/op |
GenerationTypeBenchmark.table | ss | 5 | 0.650 | ± 0.085 | s/op |
GenerationTypeBenchmark.tableOptimizer | ss | 30 | 0.295 | ± 0.018 | s/op |
GenerationTypeBenchmark.tableBatch | ss | 5 | 0.361 | ± 0.102 | s/op |
GenerationTypeBenchmark.tableOptimizerBatch | ss | 30 | 0.049 | ± 0.004 | s/op |
文章作者 olOwOlo
上次更新 2018-03-18