Forum Post: Content Upload

  • Thread starter Thread starter ankitshukla
  • Start date Start date
Status
Not open for further replies.
A

ankitshukla

Guest
Which approach will be more optimized while loading the data from text file to database? note: I have more than 10 lacs of records in text file. 1) Text file -- temp-table -- database (committing 100-100 records per transaction) Input stream instr from..... Repeat: create tt-upload-data. Import stream instr delimiter "|" tt-upload-data. End. Input stream close. find first tt-upload-data no-error. Do while avail tt-upload-data: counter initialition . do transaction: do avail tt-upload-data and counter 100: data base update : making 100 records commit in one transaction counter increment . find next tt-upload-data no-error. End. end. end. 2) Text-file -- database (direct commit) Input stream instr from..... Repeat : Import stream instr unformatted str . do while str ‘’: data base update end. end. Input stream close.

Continue reading...
 
Status
Not open for further replies.
Back
Top