View previous topic :: View next topic
|
Author |
Message |
Srinivasa Pasam
New User
Joined: 03 Sep 2008 Posts: 2 Location: UK
|
|
|
|
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 |
|
|
XungoPejcao
New User
Joined: 04 Sep 2008 Posts: 5 Location: EspaƱa
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|