Ask the Expert

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?

    Requires Free Membership to View

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

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.