Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 26 Jul 2001 @ 17:24:39 GMT


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


Subj:   Re: Import causing all-amp operation
 
From:   Geoffrey Rommel

Perhaps what folks are missing is the meaning of the USING clause. USING forces Teradata to split the request into (1) a parameterized request parcel (in this case, something like "exec macro1 (?,?,?,?)") and (2) a data parcel which contains the values to be substituted for the formal parameters. The USING clause tells the Parsing Engine what to put in the data parcel. In the first case, the USING clause is casting all variables to character:

EXPLAIN
 USING
  I1    (CHAR(9)),
  D1    (CHAR(5)),
  I2    (CHAR(10)),
  DT2   (CHAR(8))
 EXEC MACRO1
   (:I1,
    :D1,
    :I2,
    :DT2);

Explanation
-----------------------------------------------------------------------
  3) We do an all-AMPs DELETE from testdb.TABLE1 by way of an
     all-rows scan.

  -> No rows are returned to the user as the result of statement 1.

Thus, the variables in the data parcel are in character form, and Teradata must convert every one of them to numeric in order to do the comparison.

On the other hand, when you force a type of integer in the USING clause, the data parcel contains integers, so no conversion is necessary.

W. Geoffrey Rommel



     
  <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