Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 18 Feb 2003 @ 19:37:27 GMT


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


Subj:   MLOAD taking too long !!!!
 
From:   Mayur Parikh

Hi Gurus

I have a situation. I have FoxPro executable program to load data from flat file into tables. I am having array, in my program, containing files names to be loaded. For every file to be loaded, it calls mload, executes and log off, in a loop. There are four tables names in a multi load script and based on passing parameter it picks up the table to be loaded.

Right now I am trying to load text file in a table which has 1.5 million rows. I am watching mload messages in a dos window and it takes about 20 minutes in processing 100,000 records. With this pace it may take almost 4 hours to load the data.

.logtable dbname.inslogtable;
.logon use/pwd;
.accept fname,cname from file fname.txt;
database dbname;
.ROUTE MESSAGES TO FILE LOGFL WITH ECHO  TO FILE * ;
.begin import mload tables STAGFileName,
                           STAGHdrTrl,
                           STAG9201,
                           STAG9299
                           ERRLIMIT 50
                           SESSIONS 1
                           AMPCHECK ALL;

.layout incoming;
           .FIELD InRec       * varchar(444) ;

.dml label insfname;
insert into STAGFileName
values
(
set of values
);

.dml label INSHDRTRL;
insert into STAGHDRTRL
values
(

           set of values
);

.dml label ins9201;
insert into STAG9201
values
(

           set of values
);

.dml label ins9299;
insert into STAG9299
values
(
      set of values  );

.import infile &fname format vartext '|' layout incoming
  apply insfname where ('&cname'='FNAME')
  apply INSHDRTRL where ('&cname'='HDRTRL')
  apply ins9299 where ('&cname'='IN9299')
  apply ins9201 where ('&cname'='IN9201');

.end mload;
.logoff ;

This whole process is happening on NT4 and NT2K

THANX

Mayur



     
  <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