From: Edmar Wiggers <edmar@brasmap.com>
To: Alvar Freude <alvar.freude@merz-akademie.de>
To: pgsql-sql@postgresql.org
Subject: RE: Using Array-Values in subselect
Date: Tue, 14 Nov 2000 19:36:25 -0200
Message-ID: <NEBBIAKDCDHFGJMLHCKIGEDFCBAA.edmar@brasmap.com> (raw)
In-Reply-To: <3A11A5EF.C74A40EE@merz-akademie.de>
IMHO you should use another table instead of an array.
Forget about reasonable speed when using IN sub-queries, you'll get a
sequential scan of the sub-query for every row in the master select. I've
heard the EXISTS operator provides far better performance.
In 7.1, there's a very nice solution: use the sub-query in the FROM clause
and make joins to it. Should be MUCH faster.
> But this causes an error because the array field just returns a string
> instead of seperated values. Is there a way to make arrays return sort
> of "real arrays" or something usable in a subselect in reasonable speed?
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: edmar@brasmap.com, alvar.freude@merz-akademie.de
Subject: Re: Using Array-Values in subselect
In-Reply-To: <NEBBIAKDCDHFGJMLHCKIGEDFCBAA.edmar@brasmap.com>
References: <3A11A5EF.C74A40EE@merz-akademie.de> <NEBBIAKDCDHFGJMLHCKIGEDFCBAA.edmar@brasmap.com>
* 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