From: PFC <lists@peufeu.com>
To: Dawid Kuroczko <qnex42@gmail.com>
Cc: Christian Kratzer <ck@cksoft.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Big IN() clauses etc : feature proposal
Date: Tue, 09 May 2006 18:49:22 +0200
Message-ID: <op.s9amckxhcigqcu@apollo13> (raw)
In-Reply-To: <758d5e7f0605090943p1bbfdae2p4cb28ba128288316@mail.gmail.com>
References: <445F7FF8.6070707@comcast.net>
<1147110142.32369.7.camel@archimedes>
<20060508175013.GY99570@pervasive.com>
<28288.1147111196@sss.pgh.pa.us>
<op.s89zl30wcigqcu@apollo13>
<20060509105214.P90693@vesihiisi.cksoft.de>
<op.s8916gm6cigqcu@apollo13>
<758d5e7f0605090943p1bbfdae2p4cb28ba128288316@mail.gmail.com>
>> > SELECT * FROM somewhere WHERE id IN (SELECT id FROM result)
> Well, you can either
> SELECT * FROM somewhere JOIN (SELECT id FROM result GROUP BY id) AS
> a USING (id);
It's the same thing (and postgres knows it)
> You might want to use PL to store values, say PLperl, or even C, say:
I tried.
The problem is that you need a set-returning function to retrieve the
values. SRFs don't have rowcount estimates, so the plans suck.
> Should work faster than a in-application solution :)
Should, but don't, because of what I said above...
With the version in CVS tip, supprting a fast =ANY( array ), this should
be doable, though.
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-performance@postgresql.org
Cc: lists@peufeu.com, qnex42@gmail.com, ck@cksoft.de, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Big IN() clauses etc : feature proposal
In-Reply-To: <op.s9amckxhcigqcu@apollo13>
* 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