I'm trying to query a field at the Part during Labor Entry (MES), and I'm able to complete the query, but it takes too long. I've tried this multiple ways, each one takes about the same amount of time, so I'm hoping someone can point out what I'm OBVIOUSLY doing wrong, he he. We have added a UD field to the Part Master to contain the customer number associated with the part, so I have a data directive on LaborDtl. BPM employs a query, which is For each ttLaborDtl no-lock, each JobHead no-lock, each Part no-lock where ttLaborDtl.RowMod = "A" and ttLaborDtl.JobNum = JobHead.JobNum and JobHead.PartNum = Part.PartNum and Part.UserInteger1 = 284. Then I have it pop up an informational message at this point, just to make sure it is working. The problem is that it takes about 6.5 minutes to complete that. (I do have all of the company = company in there as well). Our data is about 500 gb, we are running 9.05.700c on SQL data.
Anyone have any insight as to how I can speed that up? I've even gone so far as to create a UD table to contain the part number on the job I'm testing with (put a total of 3 part numbers in the UD table, just to test), and dropped the Part table, but it still takes the same amount of time. There is no way it should take that long. I'm feeling pretty stupid at this point.
Thanks in advance for any help!