From: Tom Lane <tgl@sss.pgh.pa.us>
To: russm <russm@icorp.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: alternate idioms for large "IN (...)" lists
Date: Mon, 03 Jun 2002 19:38:31 -0400
Message-ID: <12990.1023147511@sss.pgh.pa.us> (raw)
In-Reply-To: <B9214DB0.41B0%russm@icorp.com.au>
References: <B9214DB0.41B0%russm@icorp.com.au>
russm <russm@icorp.com.au> writes:
> Just out of curiosity, why does postgresql's IN perform so poorly?
Because no one's gotten around to improving it.
The current implementation is actually just fine for small numbers of
values in the IN-list. Making it work nicely for large numbers of
values without pessimizing the small-list case would involve supporting
(at least) two implementations and teaching the planner how to choose
one. This definitely should be done, but has not gotten to the top of
anyone's to-do queue.
Most of the complaints we've seen about IN performance have to do with
the IN-subselect case, which is yet a different animal. It's likely
that that will get fixed before anyone worries about the large-number-
of-scalar-values case...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, russm@icorp.com.au
Subject: Re: alternate idioms for large "IN (...)" lists
In-Reply-To: <12990.1023147511@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox