mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-06 23:26:55 +01:00
Add BC performance knowledge from OptimAL learnings (#198)
* 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>
This commit is contained in:
parent
56ce52a9c7
commit
87ba36e650
37 changed files with 920 additions and 37 deletions
|
|
@ -0,0 +1,39 @@
|
|||
// Caller supplies an unfiltered temporary buffer that does not change during this call.
|
||||
table 50373 "Perf Cell"
|
||||
{
|
||||
DataClassification = CustomerContent;
|
||||
|
||||
fields
|
||||
{
|
||||
field(1; "Cell No."; Integer) { }
|
||||
field(2; "Item No."; Code[20]) { }
|
||||
field(3; Quantity; Decimal) { }
|
||||
}
|
||||
|
||||
keys
|
||||
{
|
||||
key(PK; "Cell No.") { Clustered = true; }
|
||||
}
|
||||
}
|
||||
|
||||
codeunit 50374 "Perf Temp Totals Bad"
|
||||
{
|
||||
procedure SumDisplayedItemTotals(var TempCells: Record "Perf Cell" temporary) DisplayedTotal: Decimal
|
||||
var
|
||||
TempScan: Record "Perf Cell" temporary;
|
||||
ItemTotal: Decimal;
|
||||
begin
|
||||
TempScan.Copy(TempCells, true);
|
||||
if TempCells.FindSet() then
|
||||
repeat
|
||||
TempScan.Reset();
|
||||
TempScan.SetRange("Item No.", TempCells."Item No.");
|
||||
ItemTotal := 0;
|
||||
if TempScan.FindSet() then
|
||||
repeat
|
||||
ItemTotal += TempScan.Quantity;
|
||||
until TempScan.Next() = 0;
|
||||
DisplayedTotal += ItemTotal;
|
||||
until TempCells.Next() = 0;
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue