Sargeable

What Does Sargeable Mean?

A sargeable query, in the context of a relational database, is one where indexes can improve the speed and efficiency of a query. As a result, it is highly desireable to have sargeable SQL queries.

Advertisements

Sargeable is derived from a contraction of Search ARGument ABLE.

Techopedia Explains Sargeable

There are several circumstances where non-sargeable queries creep in:

  • Whether predicates in WHERE clauses and JOIN clauses will prevent the use of an index
  • Where a function is included in the left part of a condition of a WHERE clause
  • When the time required to perform a SEEK on a table is greater than scanning an index when joining one table or result set onto another. Usually a seek is much faster than scanning a whole table, but when you have to seek a lot of rows, a scan could be more efficient.

In most cases, the databases management system’s query optimizer will identify opportunities to improve queries by making them sargeable.

Advertisements

Related Terms

Latest Human Resource Mgmt Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…