JDBC vs JPA native query in performance

For select queries, which one do you think will be faster in execution among JPA native query (Hibernate or EclipseLink) or JDBC query?


JPA uses JDBC so both queries will be executed exactly the same way, and have the same execution time.

JPA is an abstraction layer for the DB. It allows you to think less about the DB structure and to think more about the objects you persist.

I am sure that If you are using only native queries from JPA you will get almost the same performance as with plain JDBC, because it is passed directly to the JDBC driver.

Need Your Help

Comparing two large files

python algorithm bash grep large-files

I need to write a program that will write to a file the difference between two files.

Begin Rescue not catching error

ruby-on-rails ruby error-handling rescue

I'm using some ruby code wrapped in a begin - rescue block but somehow it manages to still crash.