d365technext: Bulk Database Operations Recordset D365FO/AX 2012
Recordset operations or set based operators
We all noticed that AX 2012 and D365FO get slow from time to time when we performed insertion or update operations on huge numbers of records one by one, and to overcome this issue, Microsoft has a feature to update or insert in bulk in a single statement.
We have 3 types of Bulk Operations
insert_recordset copies data from one or more tables directly into one resulting destination table on a single server trip. Using insert_recordset is faster than using an array insert. However, array inserts are more flexible if you want to handle the data before you insert it.
insert_recordset is a record set-based operator, which performs operations on multiple records at a time.
The list of fields in the destination table must match the list of fields in the source tables.
Data is transferred in the order that it appears in the list of fields.
Fields in the destination table that are not present in the list of fields are assigned zero-values as in other areas in X++. System fields, including RecId, are assigned transparently by the kernel in the destination table.
insert_recordset DestinationTable ( ListOfFields )
select ListOfFields1 from SourceTable [ where WhereClause ]
[ join ListOfFields2 from JoinedSourceTable
[ where JoinedWhereClause ]]
<span style="font-size: medium;">
The records, "myNum" and "mySum", are retrieved from the table another table and inserted into the table myTable. The records are grouped according to "myNum", and only the "myNum" records with a value less than or equal to 100 are included in the insertion.
insert_recordset myTable (myNum, mySum)
select myNum, sum(myValue)
group by myNum
<span style="background-color: white; font-family: "Trebuchet MS", Trebuchet, sans-serif;"> where myNum
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
|d365technext: Compare Records D365FO & AX 2012||Blog bot||DAX Blogs||0||16.11.2018 16:11|
|d365technext: Create Contact Person for Vendor Or Customer AX 2012 & D365FO||Blog bot||DAX Blogs||0||01.11.2018 16:12|
|stoneridgesoftware: Part I: Configuring the Dynamics AX 2012 R3 Entity Store||Blog bot||DAX Blogs||0||27.04.2017 12:11|
|atinkerersnotebook: Walkthrough & Tutorial Summary||Blog bot||DAX Blogs||1||09.09.2013 09:11|
|Опции темы||Поиск в этой теме|