IN clause performance

Started by Pg Coderover 18 years ago3 messagesgeneral
Jump to latest
#1Pg Coder
pgcoder@gmail.com

Basic query optimization question- does Postgres process

x IN (y1, y2)
as fast as
(x = y1 OR x = y2)

in a function?

#2Pg Coder
pgcoder@gmail.com
In reply to: Pg Coder (#1)

Basic query optimization question- does Postgres process

x IN (y1, y2)
as fast as
(x = y1 OR x = y2)

in a function?

#3Peter Wiersig
peter@friesenpeter.de
In reply to: Pg Coder (#2)
Re: IN clause performance

On Thu, Jul 19, 2007 at 05:52:30AM -0700, Paul Codler wrote:

Basic query optimization question- does Postgres process

x IN (y1, y2)
as fast as
(x = y1 OR x = y2)

in a function?

EXPLAIN indicates this.

Peter