• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

efficient way to perform CRUD operation in Oracle TopLink  RSS feed

Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Oracle TopLink
Can anybody tell me which is the most efficient way to insert/update/select operations in database? (session,custom sql,named query)
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This depends what you are doing. I would recommend you start by using the most standard way, and then optimize things if necessary.

So, map your objects using JPA, and persist them using the JPA EntityManager API, and query them using JPQL queries.

There are plenty of optimization you can use,


The most important ones are:
- using caching effectively
- using LAZY relationships
- using named queries, only using dynamic queries when required
- use sequence or table sequence with prellocation
- use batch writing
- use batch fetching or join fetching to retrieve related objects when required
- use parametrized SQL with statement caching
- ensure connection pooling is being used effectively
- ensure change tracking is being used
- use read-only queries when you only need read-only data

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!