SSC-EWI-0023
Performance Review - A loop contains an insert, delete, or update statement.
The EWI is only generated when Javascript is the target language for Stored Procedures. This is a deprecated translation feature, as Snowflake Scripting is the recommended target language for Stored Procedures.
Severity
Low
Description
This warning indicates a possible consideration that the user should have in terms of performance.
Example Code
Input Code:
-- Additional Params: -t javascript
REPLACE PROCEDURE Database1.Proc1()
BEGIN
DECLARE lNumber INTEGER DEFAULT 1;
FOR class1 AS class2 CURSOR FOR
SELECT COL0,
TRIM(COL1) AS COL1ALIAS,
TRIM(COL2),
COL3
FROM someDb.prefixCol
DO
INSERT INTO TempDB.Table1 (:lgNumber, :lNumber, (',' || :class1.ClassCD || '_Ind CHAR(1) NOT NULL'));
SET lNumber = lNumber + 1;
END FOR;
END;Output Code:
Recommendations
If you need more support, you can email us at [email protected]
Last updated
