Archives of the TeradataForum
Message Posted: Tue, 24 Jul 2012 @ 15:48:19 GMT
For example ...
REPLACE PROCEDURE LOAD_COMMENTS_P ( IN COMMENT_DT DATE, IN LINK_ID CHAR(7), IN BUL_ID_COMMENT DECIMAL(5,0), IN METRIC_TYPE_ID VARCHAR(255), IN COMMENT_TX VARCHAR(255) ) DYNAMIC RESULT SETS 1
do lots of dml and sql statements ... then ...
BEGIN DECLARE cur1 CURSOR WITH RETURN ONLY FOR SELECT ReturnText AS return_row FROM LOAD_COMMENTS; OPEN cur1; END; END RETURN_ROW; END;
Now that we've got our BI Tool to read the data returned from a SP, the question would have to be : with Dynamic Result Sets (and hence technically a Cursor), would it be slow for lots of data?
We've had this conversation in past wrt For Loops and Cursors but, given that this is a sort of short-cut syntax, does Teradata use All Amps to satisfy this Cursor, or is it still inherently a one Amp process?
Put another way, is this a robust and performant way of gathering data together - which may require different sql statements to be run, depending upon the input parameters - and then presenting back to the EndUser Tool?
Thanks for any informative comments.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 15 Jun 2023|