Skip to content

Query: Sargability of string literals in combination with non-Unicode columns #4686

@divega

Description

@divega

PR #4667 "fixed" issue #4622 by making all string literals Unicode in our SQL generation.

But it has been claimed that SQL Server cannot leverage indexes when comparing a Unicode literal or parameter against a non-Unicode column. For an example, see http://stackoverflow.com/questions/5828621/.

Rather than reopening #4622, I am creating a new issue to discuss the priority of sargability in this scenario on its own.

Whenever we decide to improve this we should verify in which scenarios the claim is valid and then we can avoid creating Unicode literals in those cases.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions