Archives of the TeradataForum
Message Posted: Tue, 12 Apr 2011 @ 14:19:41 GMT
Row-by-row processing is where there are many rows to process, one row is fetched at a time and all calculations are done on it, then it is updated or inserted. Then the next row is fetched and processed. This is row-by-row processing and it makes for a slow program.
A benefit of row processing is that there is less lock contention.
A lot of data processing is set processing, which is what relational databases do best. Instead of processing row-by-row sequentially, you can process relational data set-by-set, without a cursor. For example, to sum all payment rows with 100 or less balances, a single SQL statement completely processes all rows that meet the condition as a set. With sufficient rows to process, this can be 10 to 30 or more times faster than row-at-a-time processing.
Some good uses of SET processing include:
An update with all AMPs involved
Single session processing which takes advantage of parallel processing
Efficient updates of large amounts of data
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|