Patrick, You have, according to your description of the problem, added two hours and ten minutes to the running of this job. The adding of the constraints is off the hook because both Table1 and Table2 are always empty when this command is executed. Some additional thoughts: Your job log for this program should indicate which step is taking so long. If you don't have job logs for this job, change the logging level so that one is generated and look for the long-running command. Is Table2 cleared or are the records deleted? Strange things can happen with files containing a large number of deleted records. If the records are deleted, you would benefit by clearing the file at the point where you know it's empty. I'm assuming, since it is such an obvious solution, that the number of rows in Table1 has not increased enough to justify such a large increase in runtime. Regards, Andy Nolen-Parkhouse
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.