8000 GitHub - sgjava/jpavsdbutils: This compares JPA+Hibernate to DBUtils
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 1, 2024. It is now read-only.

sgjava/jpavsdbutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

JPA vs DbUtils

Using TomEE 7.0.4-SNAPSHOT

This compares using JPA to DBUtils for adding, selecting and deleting rows of random data. This gives you an option when you run into Object-relational impedance mismatch or situations where JPQL may not be robust enough to handle a legacy RDBMS. This is not an exhaustive performance analysis, but more of a starting point for discussion.

Here's the results using 10,000 entities with an HSQL in memory database (this is the second run so JIT could be factored in):

Jun 21, 2017 11:44:22 AM com.codeferm.jpavsdbutils.PerformanceTest performance
INFO: JPA add elapsed milliseconds: 1111
Jun 21, 2017 11:44:22 AM com.codeferm.jpavsdbutils.PerformanceTest performance
INFO: JPA get elapsed milliseconds: 55
Jun 21, 2017 11:44:23 AM com.codeferm.jpavsdbutils.PerformanceTest performance
INFO: JPA delete elapsed milliseconds: 641

Jun 21, 2017 11:44:23 AM com.codeferm.jpavsdbutils.PerformanceTest performance
INFO: DbUtils add elapsed milliseconds: 375
Jun 21, 2017 11:44:23 AM com.codeferm.jpavsdbutils.PerformanceTest performance
INFO: DbUtils get elapsed milliseconds: 40
Jun 21, 2017 11:44:23 AM com.codeferm.jpavsdbutils.PerformanceTest performance
INFO: DbUtils delete elapsed milliseconds: 306
  • DBUtils is 296% faster than JPA for inserts
  • DBUtils is 37% faster than JPA for selecting list
  • DBUtils is 209% faster than JPA for deletes

This thread discusses this project and this blog discusses issues with JPA. This isn't designed to trash JPA, but rather give you some options.

About

This compares JPA+Hibernate to DBUtils

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0