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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠