Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 12 Apr 2011 @ 14:19:41 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: Set processing VS row processing in Teradata
From:   sai

Row-by-Row Processing

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.

Set Processing

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

  <Prev Next>   <<First <Prev
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023