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. Would it be difficult to teach the planner to handle this case differently? I know it's probably not terribly common, but it is very useful.
--
Decibel! [EMAIL PROTECTED] (512) 569-9461




--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to