Method Directive long execution time

Taking a look at some server diagnostics and there’s a specific method directive that it taking a lot longer than most to run. Inside that directive there’s a rule that has a much higher execution time but the rule itself does not seem to be complicated with a lot of processes in it. I have attached the design studio of the rule and the diagnostic results with the execution time. I need help trying to figure out how to make this run faster.

Check what you queries do and how long they execute. Remove one, compare the result duration, then repeat with other. You will find what query is slow (if not both)

1 Like

Also, do you have any joins in those queries between the tt tables and full tables? That will affect performance.

I do. Both queries have links between DS tables and ERP tables

I would get the data you need in a variable from the ds table and then use it as a criteria in the DB table:

1 Like

This is all the data I need from the LaborDtl table, how can I but these into the DB table?

What is the Db table you are using? Chances are you only need one or two values from the DS table, and you can use those with the Db table criteria.