Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2011
    Posts
    30

    Unanswered: Stoared Procedure

    Hello,

    I have one SP.Its contains two main subqueries and it takes lot of time(around 8 min).

    If i will split that SP into three SPs and call this two SPS in the main procedure.

    Will that reduce the time ?

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by nanaavinash View Post
    I have one SP.Its contains two main subqueries and it takes lot of time(around 8 min).
    If i will split that SP into three SPs and call this two SPS in the main procedure.
    Will that reduce the time ?
    No.
    But consider rewriting the query (e.g. from a "NOT IN" subquery to a "NOT EXISTS").
    Impossible to give you more suggestions without seeing the query.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  3. #3
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    I agree with Peter.

    Consider to combine the two main subqueries(and other queries) into one query.

    Splitting the SP would make things worse than now, viewed in execution performance and complexity of program(s).

    Impossible to give you more suggestions without seeing the query.
    I agree!

Posting Permissions

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