The return cursor(SYS_REFCURSOR) is too much slow
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: The return cursor(SYS_REFCURSOR) is too much slow

  1. #1
    Join Date
    May 2010
    Posts
    12

    The return cursor(SYS_REFCURSOR) is too much slow

    Hi,

    I have a table :"CUSTOMER" with two thousand of records, the required
    time to retrieve this information with a query is less than 2
    seconds :
    SELECT * FROM CUSTOMER

    But i need get this information through a function that require more
    than 2 MINUTES!!!

    FUNCTION getCUSTOMER( ) RETURN SYS_REFCURSOR AS
    CUR SYS_REFCURSOR;
    BEGIN

    OPEN cur FOR ' SELECT * FROM CUSTOMER ';

    RETURN cur;
    END;

    There is any database parameter that i need change ? Any suggestion,

    Regards
    Sandeep

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by sandy_soft View Post
    There is any database parameter that i need change ?
    Are you looking for a silver bullet like _do_it_faster=true?

    What kind of application would require to do a "select *" with no predicate on the customers table? may be is time to look at database/app design before looking at backend side.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width