Hi ,
I am using C sripts for lading datato DW which is called by a DS cotrol job.
In the C sql sripts we are writing lot of warning message in to log file.Each time some particular condition occurs.
1---- Will it impact the performance of the job.?
2----or please suggest an alternative solution
Thanks
Performance issues with C sql
Moderators: chulett, rschirm, roy
Hi,
Actually it is putting warnigs and errors into a text file(say warn.txt)
Each time any error or warning occurs the main pgm will call a c procedure wich will opens the warn.txt and write the log.
Can u suggest any alternative soluton or some modifications to do the same with out impact the performance..?
Thannks in advance.
Actually it is putting warnigs and errors into a text file(say warn.txt)
Each time any error or warning occurs the main pgm will call a c procedure wich will opens the warn.txt and write the log.
Can u suggest any alternative soluton or some modifications to do the same with out impact the performance..?
Thannks in advance.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The overhead of fopen() is large. Don't open the file every time. Keep it open while the job is running, perhaps using a static file handle, and append new lines to it.
Of course, if you have multiple concurrent writers this is not a valid approach.
Of course, if you have multiple concurrent writers this is not a valid approach.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.