This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!