"IN" or "=" and "OR"

From: Vernon Wu <vernonw(at)gatewaytech(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: "IN" or "=" and "OR"
Date: 2003-01-11 18:51:44
Message-ID: XU4WIOKZYARQXVJIVS74JGWVE0KF4.3e2067c0@kimiko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


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'

Thanks.

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Neil Conway 2003-01-12 01:03:25 Re: join over 12 tables takes 3 secs to plan
Previous Message enediel 2003-01-10 00:35:01 Fw: Fw: Fw: postgresql in cluster of servers