Re: "IN" or "=" and "OR" - Mailing list pgsql-performance

From Tom Lane
Subject Re: "IN" or "=" and "OR"
Date
Msg-id 25121.1042344653@sss.pgh.pa.us
Whole thread Raw
In response to "IN" or "=" and "OR"  (Vernon Wu <vernonw@gatewaytech.com>)
List pgsql-performance
Vernon Wu <vernonw@gatewaytech.com> writes:
> Which query statement is better in terms of preformance ?
> select ... from table1 where field1 in  ('a', 'b', 'c')
> select ... from table1 where field1='a' or field1='b' or field1='c'

There is no difference, other than the microseconds the parser spends
transforming form 1 into form 2 ...

            regards, tom lane

pgsql-performance by date:

Previous
From: Neil Conway
Date:
Subject: Re: join over 12 tables takes 3 secs to plan
Next
From: "Charles H. Woloszynski"
Date:
Subject: Re: join over 12 tables takes 3 secs to plan