Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 12 Dec 2008 @ 16:32:21 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Help on cursors in teradata
 
From:   DWellman

Hi,

If you MUST use cursors then take a look at the SQL Reference manual - Stored Procedures and Embedded SQL. This has a couplf of chapters specifically for cursor processing.

However ... in the Teradata environment we generally tend to avoid using cursors. They are available, but we tend not to use them. I fully accept that there are some occassions when they are an appropriate method of processing the data, but not often. This is my experience.

When using cursors, your typical logic is

- read a record (A)

- issue command#1 using values from that record

- issue command#2 using values from that record

- issue command#3 using values from that record

- go to (A)


In a Teradata environment we would typically use the following logic:

- issue command#1 against all qualifying records

- issue command#2 against all qualifying records

- issue command#3 against all qualifying records


This approach generally takes much better advantage of the Teradata architecture (that you've paid a lot of meny for !) and will benefit from the additional processing power when you expand your system.


Regards,

Dave

Ward Analytics Ltd: Information in motion ( www.ward-analytics.com )



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