I have flat file where we use to write Error Report from a batch progarmm.
the reads from table in DB.
but that batch programm run very slow.
How can i use multiple thread to write on that file. so the performance can be improved.
. . . and get the lines in the right order? Is that possible at all?
Work out where the delays are: Execute your database query at the command line and see how long it takes. Do all the writing in one operation and time that too.