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,41 @@
|
|||
table 50360 "Perf Read Entry"
|
||||
{
|
||||
DataClassification = CustomerContent;
|
||||
|
||||
fields
|
||||
{
|
||||
field(1; "Entry No."; Integer) { }
|
||||
field(2; "Customer No."; Code[20]) { }
|
||||
field(3; "Posting Date"; Date) { }
|
||||
field(4; "Item No."; Code[20]) { }
|
||||
field(5; Quantity; Decimal) { }
|
||||
field(6; Description; Text[100]) { }
|
||||
}
|
||||
|
||||
keys
|
||||
{
|
||||
key(PK; "Entry No.") { Clustered = true; }
|
||||
key(ByCustomerDate; "Customer No.", "Posting Date")
|
||||
{
|
||||
// Supports the filters and explicit payload; implicit system fields may still require lookups.
|
||||
IncludedFields = "Item No.", Quantity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
codeunit 50361 "Perf Read Entry Good"
|
||||
{
|
||||
procedure SumNonblankItems(CustomerNo: Code[20]; FromDate: Date; ToDate: Date) Total: Decimal
|
||||
var
|
||||
Entry: Record "Perf Read Entry";
|
||||
begin
|
||||
Entry.SetRange("Customer No.", CustomerNo);
|
||||
Entry.SetRange("Posting Date", FromDate, ToDate);
|
||||
Entry.SetLoadFields("Item No.", Quantity);
|
||||
if Entry.FindSet() then
|
||||
repeat
|
||||
if Entry."Item No." <> '' then
|
||||
Total += Entry.Quantity;
|
||||
until Entry.Next() = 0;
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue