RE: Using Array-Values in subselect - Mailing list pgsql-sql

From Edmar Wiggers
Subject RE: Using Array-Values in subselect
Date
Msg-id NEBBIAKDCDHFGJMLHCKIGEDFCBAA.edmar@brasmap.com
Whole thread Raw
In response to Using Array-Values in subselect  (Alvar Freude <alvar.freude@merz-akademie.de>)
List 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?



pgsql-sql by date:

Previous
From: Roberto Mello
Date:
Subject: Re: Using Array-Values in subselect
Next
From: Alvar Freude
Date:
Subject: Re: Using Array-Values in subselect