Hi everyone
I need help regarding the update_recordset.
The one I have implemented in my code works for small amounts of data but hangs for large amounts of data (ie. 12000 records)
The statement looks like this:
update_recordSet mytable
setting
ImportStatus = _status,
HasError = NoYes::No,
InfologData = conNull()
where mytable.field1 = _field1
&& mytable.field2 = _field2;
- ImportStatus is an enum, HasError is an Enum, InfologData a container
- myTable has no code on it; it does not have an overridden update method
- Also tried AOS restart and CIL compilation
Yesterday this statement took up to 14 hours to execute with no result; we had to kill the Ax session.
Does anyone know what the problem is or have any solutions or know how to update/optimise this?
Thank you
*This post is locked for comments
container test = connull();
mytable.skipDatabaseLog(true);
mytable.skipDataMethods(true);
mytable.skip...
update_recordSet mytable
setting
ImportStatus = _status,
HasError = NoYes::No,
InfologData = test
where mytable.field1 = _field1
&& mytable.field2 = _field2;
?
Do you have any validateField, modifiedField, validateWrite, or update method overrides on your table?
If yes, the set-based operation will fall back from SQL to row-based operation, so it would take a long time.
Also make sure you have a clustered, or non-clustered index on field1 and field2 otherwise SQL will do table scan which is killing performance.
When you say small amounts of data what number are you talking about?
Also do you have database log activated on this table?
Hi BrandonSA,
Did you try to look at blocking transactions report in SQL management studio while you are executing this statement ?
Because if this table is updated via another transaction it could be locked by another update\delete\insert statement.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,316 Most Valuable Professional
nmaenpaa 101,156