Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 20 Aug 2004 @ 20:35:38 GMT


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


Subj:   Re: How About Insert Select Statement in MLOAD
 
From:   Michael Larkins

Prasanna:

The only way that might work doing an INSERT/SELECT in Mload is to do it in the Support Environment (before the .BEGIN). However, you will not be buying anything because it will still be a row level operation, like BTEQ. As you said, it will also be slow due to the Transient Journalling. It will probably even take longer because Mload will be attempting to get multiple sessions when a single session is sufficient. In other words, not a good idea to even attempt it.

The existing suggestions for exporting and importing are the route you need to pursue. Otherwise, by using bteq to do the following would be the fastest course of action:

     ins into newtable select * from original_table
     ; ins into newtable select * from other_original_table;

The trick in bteq is that the second ins into is on the same line as the semi-colon. Therefore, the two selects will be performed and then inserted into the newtable. Assuming that newtable is empty, this will be much faster. However, it does also make the assumption that you have enough PERM space to hold all the rows at the same time until you drop original_table.


Hope this helps,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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