Hi, I've run a Job that makes a Query to Customer Invoice looking for invoices with a specific product sold in a sales unit determined.
At first, I filter the invoices for product due to the fact that in the query parameters there is not sales unit, this needs to be filtered in a second step, at this point if the invoice match the criteria (product and sales unit) I stored the Date in order to set a status of the product(Obsolete if the product has not sales within 4 months).
I ran the Job but I'm getting messages of Time limit exceeded. These Jobs are running over 15000 products, I used the parallel process to run packages of 50 instances.
Does someone have any idea in how can I optimize the query to reduce the time of execution?
I've set a parameter to look for invoices at 6 months,
Thanks.
Best regards Lety