S.P. Parameter -- sending vs generating

  • This may be a silly question but I am rewriting some logic on a S.P. -- what essentially happens is one S.P. calls another S.P. sending a parameter which is used in the calculation of values used in the called S.P. but the calling S.P. has already calculated these values before calling the second S.P. for example:

    --------------

    S.P. #1

    --------------

    logic generates value1, value2 & value3

    .

    .

    call S.P. #2 ,Par1

    .

    .

    Processes Other logic

    -----------------------------------------------------------------

    --------------

    S.P. #2

    --------------

    uses Par1 to generate value1, value2 & value3 previously generated in S.P. #1

    .

    .

    Processes other Logic

    I am going to change the logic to send the already calculated values (value1, value2 & value3 ) when calling S.P. #2. Does this make sense or am I missing something here?

  • It does make sense if you are using the processing to calculate the values that you already have handy and if the second sp uses these values for further processing, it is logical to pass this values as parameters to the second sp there by reducing the processing and increasing the performance.

    Prasad Bhogadi
    www.inforaise.com

  • That's what I was thinking as well thanks for the confirmation.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply