bcquality/microsoft/knowledge/performance/singleton-setup-tables-need-no-access-optimization.md
Jesper Schulz-Wedde 0e06485027
Correct performance knowledge guidance (#94)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 667c64a8-eb36-4440-bc41-6a97d8fb5542

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
2026-07-14 11:26:29 +02:00

1.1 KiB

bc-version domain keywords technologies countries application-area
all
performance
singleton
setup-table
sales-receivables-setup
general-ledger-setup
setloadfields
bounded
al
w1
all

Enforced singleton setup tables need no access optimization

Description

An access-pattern exemption is valid only for a table whose schema and write paths enforce at most one row for the relevant scope. A conventional blank primary key, a parameterless Get(), or a table name ending in Setup does not enforce that invariant; another primary-key value can still create another row unless insertion logic prevents it.

Best Practice

Exempt a setup read only after confirming that noncanonical keys are rejected and every supported creation path preserves the singleton. Otherwise apply ordinary access-pattern analysis, even when existing application code normally uses one blank-key record.

Anti Pattern

Treating every *Setup table or parameterless Get() as proof of bounded cardinality without checking the primary key and insertion logic.