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 7169575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:01:25+00:00 2026-05-28T15:01:25+00:00

I am developing a PL/SQL stored procedure which inserts rows into a table. The

  • 0

I am developing a PL/SQL stored procedure which inserts rows into a table. The procedure potentially writes tens of thousands of rows per each call which could take minutes to complete. I’m also developing another procedure which queries the V$SESSION_LONGOPS view for information such as how much work has been done and approximately how much time remains for processing so that I could use the information for a progress bar.

Here, I’m not clear about how Oracle does things. I am going to call two procedures from a Java application and these procedures will have to run concurrently. To achieve that behaviour, do have have to use two connections to Oracle? Or is one connection enough? Does multi-threading automatically happen in an Oracle session if multiple connections are used?

I’m using Hibernate to connect to the database. And I have a few questions for the application too. If I send two queries to the database from two threads, does Hibernate use two connections from its connection pool to send the queries? The second query (which will be used by the progress bar) will run repeatedly while the first query (which performs the inserts) is still executing.

Thanks in advance.

  • 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-28T15:01:27+00:00Added an answer on May 28, 2026 at 3:01 pm

    A Hibernate session is not thread-safe, and so each thread must have its own session. Each session uses a JDBC connection, so both sessions will each get a different JDBC connection from the pool.

    And of course, Oracle allows concurrent access to the database using two connections, else every app out there would have serious performance problems.

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

Sidebar

Related Questions

I have a stored procedure that inserts batches of millions of rows, emerging from
I am developing a website with huge data which to be stored in SQL
I'm developing a C# SQL Server 2005 stored procedure that does data validation for
I'm using SQL Server and I've been developing a stored procedure to rename (actually,
I am developing a small stored procedure on SQL server 2008. I have little
I am developing a report which outputs data in a SQL Table via an
I've recently started developing my first serious application which uses a SQL database, and
I'm currently developing a stored procedure for a complex search in a big database.
I'm currently developing PL/SQL stored procedures for my company and I'd like to use
I am currently developing a WPF client application which uses Linq-to-SQL for the typed

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.