Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 664041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:33:22+00:00 2026-05-13T23:33:22+00:00

I keep running into enq: TX – row lock contention, when I run the

  • 0

I keep running into “enq: TX – row lock contention”, when I run the Sql command below in a oracle 9 DB.
The table mytable is a small table, with less than 300 lines.

UPDATE MYTABLE
SET     col1 = col1 + :B3 ,
        col2    = SYSDATE
WHERE   :B2            = col3
    AND :B1        = col4

I run 10 threads at the same time, and some wait as long as 10 seconds to get a chance to update. I know I will face this deadlock issues, but the problem for me is that they should be able to be much faster, since the table is small, so updating it would be fast.

edit:I cannot alter this code, it is inside a third party application. I can only tweak the DB.

what can I do to improve the speed of the rowlock queue?
How can I improve this waiting time so my threads run faster?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:33:22+00:00Added an answer on May 13, 2026 at 11:33 pm

    If you don’t want to be blocked don’t try to update blindly. Perform a SELECT FOR UPDATE NOWAIT first. If you raise an exception (ORA-00054) this means that another session is currently working with that row. In that case, depending upon your requirement, you could try to update another row (are you trying to build a queue/dequeue process?), wait (dbms_lock.sleep) or return an error message to the calling app.

    You will never face a deadlock if you lock the row with FOR UPDATE NOWAIT first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 349k
  • Answers 349k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer How about something like VB.Net Private Shared Function ColorGradientRedToBlue(ByVal index… May 14, 2026 at 6:46 am
  • Editorial Team
    Editorial Team added an answer You could use git-svn and establish a local git repository… May 14, 2026 at 6:46 am
  • Editorial Team
    Editorial Team added an answer Files in src/main/resources are copied to the target/classes directory and… May 14, 2026 at 6:46 am

Related Questions

I keep running into this. I want to spawn processes and pass arguments to
I keep running into scenarios where I would like to provide a slightly more
I keep running into problems the larger my program gets. For instance, I get
I keep running into this design problem, and I'm not happy with my solution
I keep running into all sorts of nuances between the web site project versus

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.