Indexable Expressions
In other books and materials on SQL Server, you often see the discussion of index use in query plans couched in terms of “SARGs”—search arguments in a query that the optimizer can translate into a comparison between an index key and a value. There is, however, no such concept within the optimizer code itself. The term “SARG” is an anachronism from the old Sybase code base and Sybase training materials. The optimizer in all recent versions of SQL Server is far more sophisticated in terms of its ability to use an index to speed up a query than it was in older versions of the product. The optimizer's ability to use indexes is no longer constrained to simple expressions, nor is the decision of whether or not to use an index ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access