Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locking on multiple simultaneous inserts

 
Onkar Joshi
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am reading messages from a JMS queue. Each message from the queue translates to an insert on a table that has no index and no PK.

My problem is that the inserts are getting serialized resulting in messages being consumed very slowly. (While messages are put into the queue much faster)

So are inserts on a table always serialized or under certain conditions? What?

Would appreciate any insight here!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Onkar,
What are your settings? In particular, the transactions settings and the number of current messages being taken off the queue.
 
Casttro Francis
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree that the MDB will pick a message from the Queue Asynchronously. Use data source for better performance

And the important thing here for Performance

1. Try to develop a PL SQL package and insert messages Using a bulk insert. And the PL SQL package using Callable stmt.
2. Or use Execute Update.

If this not suits your requirement. Explain more detail about your requirements.
 
Onkar Joshi
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We managed a huge boost in performance by using multiple partitions for our target table.

I agree there are other things that can be done for further improvements. But the one above required almost no effort on our part other than finding out that doing that would improve things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic