Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1994

How to Tune SQL Statement with IN Operator with an Expression List for SQL Server?

$
0
0
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.
[​IMG]
The query plan shows three Hash...

How to Tune SQL Statement with IN Operator with an Expression List for SQL Server?

Viewing all articles
Browse latest Browse all 1994

Trending Articles