I have a program(EOD batch) which processes the daily accrued up accounting positions and updates the UPDT table.
The program is such that.
- Query fetches the results from various tables as a result of join etc and stores the records in
tempfile.txt
- Records are read one by one from tempfile.txt and some series of calculations happen.
- For each record which is read; after the calculations are complete for that record, we call
update_UPDT()
method which commits the calculated values to UPDT table in database.
NOTE: I want to improve the performance of the program.
Please suggest a better approach.
I have several plans in mind.
- Use Xml instead of tempfile. Xml would be lighter.
- Instead of writing each record to DB one by one, write to some temp table or say xml and then do bulk posting to DB once entire set of calculations are happnened for all records.
Any other suggestions ?
Or using arrays would be better?