Is there any performance difference between a SQL "IN" statement versus using "OR"?

Posted by Mark Kadlec on Stack Overflow See other posts from Stack Overflow or by Mark Kadlec
Published on 2010-04-29T19:43:50Z Indexed on 2010/04/29 19:47 UTC
Read the original article Hit count: 278

Filed under:
|

Thought I would ask the knowledgeable StackOverflow community a question that was on my mind today and I can't seem to find an answer.

Is there any performance difference or advantage between an "IN" or using "OR"?

Ie. Is

SELECT type FROM types WHERE typecat IN ('abc', 'def')

better than

SELECT type FROM types WHERE typecat = 'abc' OR typecat = 'def'

© Stack Overflow or respective owner

Related posts about sql

Related posts about syntax