bcquality/microsoft/knowledge/performance/choose-maintainsiftindex-by-read-write-ratio.good.al
Jesper Schulz-Wedde 78eeb86a37 Promote performance knowledge from community to Microsoft layer
Pure git-mv relocation of all 7 performance articles from community/knowledge/performance/ to microsoft/knowledge/performance/. No content changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-25 14:03:39 +02:00

32 lines
1.1 KiB
AL

table 50100 "Item Ledger Entry (Demo)"
{
fields
{
field(1; "Entry No."; Integer) { DataClassification = SystemMetadata; }
field(2; "Item No."; Code[20]) { DataClassification = CustomerContent; }
field(3; "Posting Date"; Date) { DataClassification = CustomerContent; }
field(4; Quantity; Decimal) { DataClassification = CustomerContent; }
field(5; "Cost Amount"; Decimal) { DataClassification = CustomerContent; }
}
keys
{
key(PK; "Entry No.") { Clustered = true; }
// Write-heavy ledger key: aggregates on this key are read rarely relative
// to INSERT frequency. Keeping SIFT live on every write is net-negative.
key(ByItemAndDate; "Item No.", "Posting Date")
{
SumIndexFields = Quantity, "Cost Amount";
MaintainSIFTIndex = false;
}
// Dashboard-facing key: aggregates read on every session load, underlying
// rows updated infrequently. Keeping SIFT live pays for itself.
key(ByItem; "Item No.")
{
SumIndexFields = Quantity;
MaintainSIFTIndex = true;
}
}
}