Re: Regression in IN( field, field, field ) performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim 'Decibel!' Nasby" <jnasby(at)cashnetusa(dot)com>
Cc: Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Regression in IN( field, field, field ) performance
Date: 2008-10-21 17:06:05
Message-ID: 27464.1224608765@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jim 'Decibel!' Nasby" <jnasby(at)cashnetusa(dot)com> writes:
> WHERE '12814474045' IN (people.home_phone, people.work_phone,
> people.mobile_phone)

> Yeah, not exactly a common case, but at least in 8.1 this was turned
> into a set of ORs. Starting in 8.2 and in current HEAD, the planner
> turns that into:

> Filter: ('12814474045'::text = ANY ((ARRAY[home_phone, mobile_phone,
> work_phone])::text[]))

> Which means automatic seqscan.

It means no such thing.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gevik Babakhani 2008-10-21 17:11:58 Buildfarm Cardinal going down.
Previous Message Tom Lane 2008-10-21 16:59:02 Re: pgsql: SQL 200N -> SQL:2003