View previous topic :: View next topic
|
Author |
Message |
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
I have a vsam file having key in first 9 digits and It stores about 300k records.
Also i have an input file PS file which contains the 9 digit key in its records and stores around the same no of records.
The program opens the VSAM file in I-O mode (access mode is dynamic).
The PS file is read sequentially and for each record in it, it takes 9 digit key and does a random read on the vsam file.If it find it in the vsam file, it updates a field in vsam, else it reads next record from ps file.
Now my question is, would it improve any performance, if I sort my PS file in the order of the 9 digit key.
Thanks
Ajay |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Probably yes, as the access although randon will be in a sequential pattern. This may avoid the same index buffers being loaded, cleared and reloaded many times. Obviously depending on the way in which the keys in the PS file are distributed. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why not skip sequential for the vsam?
as well as sorted ps file? |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Quote: |
Probably yes, as the access although randon will be in a sequential pattern. This may avoid the same index buffers being loaded, cleared and reloaded many times. Obviously depending on the way in which the keys in the PS file are distributed. |
Well, i tested it with 5 million records in the PS file, and 2M records in Vsam file. While with the sorted ps file the job finished in 15 minutes, whereas it took 2 hours when the input was not sorted.
Thanks Expat and dbzTHEdinosauer.
-Ajay |
|
Back to top |
|
|
|