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?

已提問 2 年前檢視次數 539 次
1 個回答
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
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南