11.09.2021, 21:22 | #1 |
Участник
|
d365technext: Bulk Database Operations Recordset D365FO/AX 2012
Источник: https://d365technext.blogspot.com/20...ertations.html
============== 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 : 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. Syntax : 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 ]] Example : <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) from anotherTable group by myNum <span style="background-color: white; font-family: "Trebuchet MS", Trebuchet, sans-serif;"> where myNum
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|