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回答
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ