The following is an example shows a SQL statement with an IN List expression. The SQL retrieves records from EMPLOYEE table that EMP_DEPT should match any value in a list of values.
select EMP_ID
from EMPLOYEE
WHERE EMP_DEPT IN ('AAD','COM','AAA')
AND EMP_SALARY<10000000
Here the following are the query plans in the Tosska proprietary tree format, it takes 2.4 seconds to finish.
The query plan shows three Hash...
How to Tune SQL Statement with IN Operator with an Expression List for SQL Server?
select EMP_ID
from EMPLOYEE
WHERE EMP_DEPT IN ('AAD','COM','AAA')
AND EMP_SALARY<10000000
Here the following are the query plans in the Tosska proprietary tree format, it takes 2.4 seconds to finish.
![[IMG]](http://live.staticflickr.com/65535/51100480046_58b7506fe4_b.jpg)
The query plan shows three Hash...
How to Tune SQL Statement with IN Operator with an Expression List for SQL Server?