Filter is often used to filter out some records when writing SQL statements)
Copy codeThe Code is as follows: where amount> 4000 and amount <6000 the above sentence is a filtering condition.
Of course, this does not mean the where clause of SQLSERVER. It means that does not use indexes for expressions without the SARG operator in SQLSERVER. SQLSERVER is difficult to use relatively optimized methods for these expressions.
This means that if no where clause in your SQL statement contains a non-SARG operator, your SQL statement will not use the index in the table.
Which of the following are non-SARG operators?:
Non-SARG operators include
NOT,
<>,
Not exists,
Not in,
NOT LIKE
The rule is that indexes cannot be used basically because of the "NOT" keyword or non-equal meaning.
There are also some internal functions. If these internal functions are used, SQLSERVER does not use indexes.
Internal functions, such as CONVERT () and UPPER ()