Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate: Performance issue

 
amit attri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on a java servlet application that uses hibernate with oracle.
This issue concerns with hibernate transaction (between session.beginTransaction() and commit).

I'm running a 30 transaction per second load in which all transactions are updating a single column of a specific row of table.
Say, column is C, Row is R and table is T.
The time taken to run this update command is very high via hibernate.

I did an experiment, in which I used pure jdbc instead of Hibernate and results were awesome.

So first question is that, Can I make a pure jdbc hit using hibernate ?
(I tested with Hibernate 3.2 native SQL API (createSQLQuery) but results were pretty bad)

If yes, Can I use hibernate query as well as pure jdbc hit in a single session of Hibernate.

--------------------------------
Example:

objTransactionManager = session.beginTransaction();
session.update(TransactionCountDTO); --> This is a hibernate object
session.save(MoneyTransactionDTO); --> This is a hibernate object
session.executeUpdate(sqlQuery); --> This is a pure jdbc hit
objTransactionManager.commit();
-------------------------------

Please help. I'm stuck in a mess here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic