SQL IN Clause 1000 item limit

You should transform the IN clauses to INNER JOIN clauses.

You can transform a query like this one

SELECT foo FROM bar WHERE bar.stuff IN (SELECT stuff FROM asdf)

in a query like this other one.

SELECT b.foo FROM ( SELECT DISTINCT stuff FROM asdf ) a JOIN bar b ON b.stuff = a.stuff

You will also gain a lot of performance

你可能感兴趣的:(SQL IN Clause 1000 item limit)