RE: Using Array-Values in subselect

From: "Edmar Wiggers" <edmar(at)brasmap(dot)com>
To: "Alvar Freude" <alvar(dot)freude(at)merz-akademie(dot)de>, <pgsql-sql(at)postgresql(dot)org>
Subject: RE: Using Array-Values in subselect
Date: 2000-11-14 21:36:25
Message-ID: NEBBIAKDCDHFGJMLHCKIGEDFCBAA.edmar@brasmap.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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?

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Alvar Freude 2000-11-14 21:48:12 Re: Using Array-Values in subselect
Previous Message Roberto Mello 2000-11-14 21:15:11 Re: Using Array-Values in subselect