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 ...

Get Guru's Guide to SQL Server Architecture and Internals, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.