List:General Discussion« Previous MessageNext Message »
From:Baron Schwartz Date:March 31 2009 2:08am
Subject:Re: IN vs. OR on performance
View as plain text  
On Sun, Mar 29, 2009 at 10:19 AM, Claudio Nanni <claudio.nanni@stripped> wrote:
> An explain of the two statements yields the same plan,
> anybody knows if they are actually translated in the same plan?

There is a difference.  The IN list is sorted so lookups can be done
as a binary search.  A bunch of OR's just evaluates each condition one
at a time until one matches.
Thread
IN vs. OR on performanceOscar29 Mar
  • Re: IN vs. OR on performanceIan P. Christian29 Mar
    • RE: IN vs. OR on performanceMartin Gainty29 Mar
    • Re: IN vs. OR on performanceClaudio Nanni29 Mar
      • Re: IN vs. OR on performanceBaron Schwartz31 Mar