mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 06:36:55 +01:00
* Add BC performance knowledge from OptimAL learnings Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Address review feedback on performance guidance Clarify predicate-supporting keys versus covering queries, demonstrate proven cache reuse, and evaluate the updated partial-load and bulk-update rules. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
56 lines
1.3 KiB
AL
56 lines
1.3 KiB
AL
// Each invocation exclusively owns a new run; these tables have no write logic.
|
|
table 50364 "Perf Input"
|
|
{
|
|
DataClassification = CustomerContent;
|
|
|
|
fields
|
|
{
|
|
field(1; "Row No."; Integer) { }
|
|
field(2; "Item No."; Code[20]) { }
|
|
field(3; Quantity; Decimal) { }
|
|
}
|
|
|
|
keys
|
|
{
|
|
key(PK; "Row No.") { Clustered = true; }
|
|
}
|
|
}
|
|
|
|
table 50365 "Perf Output"
|
|
{
|
|
DataClassification = CustomerContent;
|
|
|
|
fields
|
|
{
|
|
field(1; "Run ID"; Guid) { }
|
|
field(2; "Line No."; Integer) { }
|
|
field(3; "Item No."; Code[20]) { }
|
|
field(4; Quantity; Decimal) { }
|
|
}
|
|
|
|
keys
|
|
{
|
|
key(PK; "Run ID", "Line No.") { Clustered = true; }
|
|
}
|
|
}
|
|
|
|
codeunit 50366 "Perf Buffered Insert Good"
|
|
{
|
|
procedure CopyRun(var TempInput: Record "Perf Input" temporary) RunId: Guid
|
|
var
|
|
Output: Record "Perf Output";
|
|
NextLineNo: Integer;
|
|
begin
|
|
RunId := CreateGuid();
|
|
if TempInput.FindSet() then
|
|
repeat
|
|
NextLineNo += 1;
|
|
Output.Init();
|
|
Output."Run ID" := RunId;
|
|
Output."Line No." := NextLineNo;
|
|
Output."Item No." := TempInput."Item No.";
|
|
Output.Quantity := TempInput.Quantity;
|
|
Output.Insert(false);
|
|
until TempInput.Next() = 0;
|
|
end;
|
|
}
|