On Feb 1, 2007, at 8:19 AM, Ion Silvestru wrote:

If we have a query where we compare a column to a set of values, then
which is faster: OR or IN?
Ex: OR: (mycol = "a") OR (mycol = "b") OR (mycol = "c") OR...
    IN: (mycol IN "a", "b", "c" ...)

IN is much faster - OR disables any use of indexes for column mycol.

Cheers, Peter.

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to