Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opt: virtual columns in the primary key should be consider STORED #75874

Closed
mgartner opened this issue Feb 2, 2022 · 0 comments · Fixed by #75898
Closed

opt: virtual columns in the primary key should be consider STORED #75874

mgartner opened this issue Feb 2, 2022 · 0 comments · Fixed by #75898
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team

Comments

@mgartner
Copy link
Collaborator

mgartner commented Feb 2, 2022

From the perspective of the optimizer, any virtual column in the primary key should be considered STORED because it acts exactly like a stored computed column in a primary key: it can be produced from a primary index scan and any secondary index scan without needing to be calculated.

Related: #75147

@mgartner mgartner added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Feb 2, 2022
@mgartner mgartner self-assigned this Feb 2, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Feb 2, 2022
@craig craig bot closed this as completed in 8ec5bf1 Feb 8, 2022
@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant