• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

efficient way to perform CRUD operation in Oracle TopLink

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,

See,
http://wiki.eclipse.org/EclipseLink/Performance

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


 
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic