IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 table cursor versus Flat file read performance


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Srinivasa Pasam

New User


Joined: 03 Sep 2008
Posts: 2
Location: UK

PostPosted: Thu Sep 11, 2008 4:28 pm
Reply with quote

Hi,

We have tables that have millions of records. we need to read each record and produce the output based on specific values in some positions of each column data.

Is it faster to unload entire table into flat file and read each record and process the data or declare a cursor in program and read all records one by one and process the data.

I believe unload into flat file and process may be faster.

Please help me.
Back to top
View user's profile Send private message
XungoPejcao

New User


Joined: 04 Sep 2008
Posts: 5
Location: EspaƱa

PostPosted: Thu Sep 11, 2008 5:32 pm
Reply with quote

Hi!

If you do not have problems of storage, and you can use DASD, it is a better option unload the table to sequential file.
In case you had to use Tapes or Cartridge for problems of storage in the installation... probably if that serious better to access DB2 in cursor mode.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 11, 2008 8:33 pm
Reply with quote

Hello,

Quote:
I believe unload into flat file and process may be faster.
It may be. It would be worth a test or 2.

Also, if there is a high volume of data to be processed, using the unload will take the overhead away from the database leaving those resources for other tasks rather than possibly contributing to a bottleneck.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Load new table with Old unload - DB2 DB2 6
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top