on 07-01-2019 5:42 PM
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
Hi Lety,
A mass data run can only be running for 10 hours after that time it simply times out.
Since you are looking at Sales in different periods,
One of the options you have is to Query the Customer Invoices on a month by month (or every 2 months) basis by using a range this way the execution of the MDR should be within the timeout period.
Secondly if you do not require to modify the data of the returned nodes you can query for the object data only with the ExecuteDataOnly function this is much more efficient than using the Execute function.
----
Here is a run down on all the possible Query Operations available:
Execute - Returns the instances from the database with an attempt to retrieve the data from the buffer.
ExecuteDataOnly - Returns the instances only for the queried node.
ExecuteFromDB - Behaves like execute but does not check the buffer for the queried node.
ExecuteFromDBDataOnly - Returns instances only for the queried node without checking the buffer.
GetFromDB - Returns the instances from the database for the queried node and node collection including the dependent object node and extensions nodes. This is useful if you want to compare the buffer values with the database values.
I hope this helps,
Piotr.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.