Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 15 May 2006 @ 18:15:52 GMT


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


Subj:   Re: Replacement of Oracle Cursors in Teradata??.
 
From:   Kohut, Eric

I will try to clarify and strengthen this recommendation a little.

Many people use cursors for everything in Oracle, especially very large volumes of update work.

You should rarely use these types of cursors in Teradata as you would use them in Oracle.

You can use a relatively small cursor to make a list of things to do but that list should be small Usually < 500 - 1000 rows. You can go over this # but you need to understand that each request is A separate trip back into to the database for the next piece of work.

I would turn almost every cursor into SQL and only use the cursors and other looping functions in Stored Procedures for application logic control, SQL error checking and validation, etc...

Cursors and Stored Procedures are not bad but they do perform differently from other databases and are targeted at a different sort of work.

In Teradata SQL is always parallel, so SQL is almost always the best performing way to attack a problem. Turning procedural code into SQL takes a while to get used to but you'll be very glad that you did.


Good Luck,

Eric



     
  <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