Automatic optimization of IN clauses via INNER JOIN - Mailing list pgsql-performance

From Thomas Hamilton
Subject Automatic optimization of IN clauses via INNER JOIN
Date
Msg-id 293252.2824.qm@web45814.mail.sp1.yahoo.com
Whole thread Raw
Responses Re: Automatic optimization of IN clauses via INNER JOIN  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Automatic optimization of IN clauses via INNER JOIN  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-performance
Apparently the latest version of MySQL has solved this problem:
http://www.xaprb.com/blog/2006/06/28/why-large-in-clauses-are-problematic/

But I am running PostgreSQL v8.3 and am observing generally that SELECT ... WHERE ... IN (a, b, c, ...) is much slower
thanSELECT ... INNER JOIN (SELECT a UNION ALL SELECT b UNION ALL SELECT c ...) 

Why doesn't the optimizer automatically transform IN clauses to INNER JOINs in this fashion?





pgsql-performance by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Parallel Function calls using multiple processes
Next
From: Tom Lane
Date:
Subject: Re: Automatic optimization of IN clauses via INNER JOIN