Q

Are PL/SQL stored procedures multi-threaded?

Are PL/SQL stored procedures multi-threaded inherently? If yes, in the same SP when executed concurrently for multiple client sessions (or maybe even from the same session ), will these concurrent threads have their own copy of all the variables used? As DMLs are already taken care of by the database for concurrency, is it enough if we take care of the concurrency issues of the variables?
The variables in use for a stored procedure are taken care of in the user's Program Global Area (PGA). When multiple users simultaneously execute the same stored procedure, the PGA keeps track of the state of that user's execution of the stored proc. You do not have to worry about concurrency issues for these variables. Oracle handles it for you.
This was first published in August 2004

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close