Repository navigation
Performance knowledge: keep low-selectivity fields out of key columns - #226
Open
Miljan Milosavljević (miljance) wants to merge 1 commit into
Open
Miljan Milosavljević (miljance) wants to merge 1 commit into
Miljan Milosavljević (miljance) wants to merge 1 commit into
Conversation
The covering-key guidance says which predicates a key should support but not which ones to leave out, so agents turn every filtered Boolean, Option/Enum or status field into a key column. Add an article that keeps such fields out of key columns and out of IncludedFields when the serving process rewrites them, with explicit exceptions for SIFT, read-heavy covering, skewed data and unique keys, plus a good/bad sample pair. The performance review worklists it when a changed key contains such a field. Refs microsoft#224 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #224
Mistake prevented
design-covering-keys-from-read-pattern.mdsays which predicates a key should support, but no article says which predicates should stay out of a key. Agents applying the guidance turn every filtered field into a key column, including Boolean, small Option/Enum and status fields (Processed,Blocked,Status), sometimes as the leading column. Such a column:Processed = false, thenModifyAll(Processed, true));Change
microsoft/knowledge/performance/keep-low-selectivity-fields-out-of-key-columns.md, with a.bad.al/.good.alpair. The samples use the same reader code, and only the key differs.flowfield-source-key-needs-sumindexfields.md);IncludedFields, when the process does not update the field;al-performance-review.mdgains one worklist sentence that loads the article when an added or changed key, or itsIncludedFields, contains a Boolean, Option, Enum or status field. The existing rule that a changed key alone is not a finding still applies.Evidence
Versions and domain
bc-version: [all].IncludedFieldsrequires runtime 8.0 (BC 19).performancedomain is Microsoft-owned, and this is general key behaviour rather than an organization policy, so the article belongs in the Microsoft layer.Checks
validate_frontmatter.py: 0 errors. Its 2 warnings come from pre-existing files this PR does not touch.Test-KnowledgeIndex.ps1,Test-ReviewFixtures.ps1andTest-ReviewContract.ps1all pass.🤖 Generated with Claude Code