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

  • SEARCH
  • Home
  • 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 7415469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:18:33+00:00 2026-05-29T07:18:33+00:00

I developed a PL/SQL stored procedure which returns a sys_refcursor create or replace procedure

  • 0

I developed a PL/SQL stored procedure which returns a sys_refcursor

create or replace procedure updateProgress( ref_out out sys_refcursor
                                           , v_context in number)
is
begin

   open ref_out 
    for select serial# serialnumber
      , time_remaining remainingtime
      , elapsed_seconds elapsedtime
      , (100 * sofar) / totalwork accomplishedpercentage
   from v$session_longops
  where target = 9 
    and target_desc = 'inserting nonsense' 
    and context = v_context;

end updateProgress;

I’m going to execute this procedure within a single session a number of times. After the first call, does each subsequent call execute the query again or is the result of the first query cached to be reused for subsequent calls?

  • 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-29T07:18:34+00:00Added an answer on May 29, 2026 at 7:18 am

    It will not be cached; the query will be executed for each call.

    Be careful: querying the v$session_longops is not a very reliable way to monitor the progress of execution. The data returned is not always full (e.g. not all SQL statements might be included) and I definitely would not rely on the time_remaining value; to me it often seemed to be a wild guess rather than a good estimation…

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

Sidebar

Related Questions

Through Oracle queries is it possible to find out which views/synonyms/tables a stored procedure
I've a list of .sql script files to create Stored Procedures which I'm using
Here I have a stored procedure in Oracle: CREATE OR REPLACE PROCEDURE StP_COMPS IS
I am trying to debug a stored procedure using Oracle SQL Developer. The DB
I have a stored procedure which will be used to populate a report in
I've developed a couple of T-SQL stored procedures that iterate over a fair bit
I need to execute a SQL stored procedure every time before I query my
I'm trying to make a Java Stored Procedure in Oracle 11g which retrieve Google
I need to develop an application which stores data in a SQL Server 2005
I have a website that was originally developed using a SQL Express database in

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.