#226 Performance knowledge: justify low-selectivity fields in key columns
New performance guidance for justifying low-selectivity fields in table keys, requiring evidence such as filtered reads or skewed distributions before including Boolean, Option, or status fields in key columns.
- 5files
- 4AL files
- 0objects
Pull request · merged into main on 2026-10-20 by miljance · 5 files (+122 -1), 4 AL · feature · tier official · reviewed (checked by Opus)
What changed
- Adds burden-of-proof rule for low-selectivity fields in keys to prevent over-indexing
- Includes bad and good code examples showing a key with unfiltered leading flag being rewritten by ModifyAll
- Requires evidence like equality filters on rare values, SIFT keys, unique combinations, or usage data
- Performance review workflow now checks new or changed keys for Boolean, Option, Enum, or status fields
- Applies to all BC versions with guidance on IncludedFields requirement for runtime 8.0+
AL objects touched
microsoft/knowledge/performance/justify-low-selectivity-fields-in-key-columns.bad.al: added, not in the BC? snapshot yetmicrosoft/knowledge/performance/justify-low-selectivity-fields-in-key-columns.good.al: added, not in the BC? snapshot yetmicrosoft/knowledge/performance/justify-low-selectivity-fields-in-key-columns.md: added, not in the BC? snapshot yetmicrosoft/skills/review/al-performance-review.md: modified, not in the BC? snapshot
Context
- Fixes: #224 [Performance] Covering-key guidance needs a counterweight: keep low-selectivity columns out of key columns (closed)
- Systems: development, platform
- From the description: “A low-selectivity or process-mutated key column needs a named read and evidence”
Source: metadata of a merged pull request in microsoft/BCQuality (bcquality): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).