Performance of Redshift Stored Procedure is not upto mark

0

Hi All, In my stored procedure, I have scursor which loops through the table and each record will go through many IF Conditions and as per result I will move further using fetch next while being inside loop itself.I am not able to do BULK UPDATE cause my requirement demand row level processing.It is performing good for just One id, but i have large number of ids which needs to be processed by this sp and time taken is beyond the expectation.How to speed up this stored procedure in Redshift?

  • Row by row processing is not ideal in Redshift or really any MPP database. Can you provide sample code and maybe we can help you convert it into a set based approach?

1 Answer
0

Hello,

Thank you for posting your question.

To further dive deep on the specifics of the slow execution of this stored procedure, I would ask that you open a support case and include the output of:

SHOW PROCEDURE sp_name

Reference: https://docs.aws.amazon.com/redshift/latest/dg/r_SHOW_PROCEDURE.html

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions