#Stored Procedure#

Hi All,

Is there any data restriction in SP while retrieving a data from DB?

I am facing some sort of weird issue that When I executes SP from Appian end(Process modelling), it fails to execute intermittently . Out of 10 times, it executes at most once and remaining time it just skips the node and no data is getting saved(I am performing selection on single table and inserting onto another after manipulating few data). However When I executes from DB directly, it works fine as expected which shows that no logical issue.So How can I solve this issue?

Thanks in advance..!

Note:And also I would like to highlight that execution time of SP ranges from 40 min to 1 hour as I am dealing with huge amount of data.

  Discussion posts and replies are publicly visible

Parents
  • Hi melwyna,
    You can optimize the stored proc for better performance. Also you can use cursors if you need for looping if necessary.
    There might be multiple reasons for slowness,
    1. Indexes on target table - If there are indexes on target table, it might be the reason for slowness. So if you are updating other tables, you can think of dropping indexes before updation and recreate those after operation is done (This is useful if this is one time process OR weekly and happening outside of business hours)
    2. Huge data: If data is huge, it takes time to execute the stored proc. I dealt with 100k database rows and it took around 10-15 mins for execution. If you are handling huge data, even simple operation can impact performance. So you need to carefully design and use it. Use cursors for better performance.

    If you can provide more details about how much data you dealing with and what kind of manipulations you are doing, that might help us suggest better approach for this.

    Regards,
    Ashish.

Reply
  • Hi melwyna,
    You can optimize the stored proc for better performance. Also you can use cursors if you need for looping if necessary.
    There might be multiple reasons for slowness,
    1. Indexes on target table - If there are indexes on target table, it might be the reason for slowness. So if you are updating other tables, you can think of dropping indexes before updation and recreate those after operation is done (This is useful if this is one time process OR weekly and happening outside of business hours)
    2. Huge data: If data is huge, it takes time to execute the stored proc. I dealt with 100k database rows and it took around 10-15 mins for execution. If you are handling huge data, even simple operation can impact performance. So you need to carefully design and use it. Use cursors for better performance.

    If you can provide more details about how much data you dealing with and what kind of manipulations you are doing, that might help us suggest better approach for this.

    Regards,
    Ashish.

Children
No Data