Locking during or processing

In some cases, queries using or clauses are processed as a union of more than one query. Although some rows may match more than one of the or conditions, each row must be returned only once. Different indexes can be used for each or clause. If any of the clauses do not have a useful index, the query is performed using a table scan.

The table’s locking scheme and the isolation level affect how or processing is performed and the types and duration of locks that are held during the query.