Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 12 Feb 2002 @ 16:49:31 GMT


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


Subj:   Re: Insert data into table
 
From:   Andres Del Villar

Our tables have only UPI. I deleted statistics because i need to know if the process is better or worse than tables with statistics. I know that the statistics are usefull for client-queries, but in my particular case, and only in this moment, i'm testing several choices for resolve my problem.

The explain for one on our queries is

INSERT INTO ventas.talineadetalle
SELECT *
FROM temporal.talineadetalletemp

Explanation
--------------------------------------------------
 
  1)First, we lock a distinct Temporal."pseudo table" for read on a RowHash to prevent global deadlock for Temporal.taLineaDetalleTemp.  
  2)Next, we lock a distinct Ventas."pseudo table" for write on a RowHash to prevent global deadlock for Ventas.taLineaDetalle.  
  3)We lock Temporal.taLineaDetalleTemp for read, and we lock Ventas.taLineaDetalle for write.  
  4)We do an all-AMPs RETRIEVE step from Temporal.taLineaDetalleTemp by way of an all-rows scan with no residual conditions into Spool 1, which is built locally on the AMPs. Then we do a SORT to order Spool 1 by row hash. The size of Spool 1 is estimated with low confidence to be 237,492 rows. The estimated time for this step is 1 minute and 37 seconds.  
  5)We do a MERGE into Ventas.taLineaDetalle from Spool 1 (Last Use).  
  6)Finally, we send out an END TRANSACTION step to all AMPs involved in processing the request.  
  ->No rows are returned to the user as the result of statement 1.  


This table have only a UPI

This sentence take around 50 minutes and insert only 300.000 rows app.


adelv
DBA - FASA



     
  <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