Re: [SQL] Performance Problem with sub-select using array

2006-08-29 Thread Aaron Bono
On 8/28/06, Travis Whitton <[EMAIL PROTECTED]> wrote: I'm pretty sure you're right, which leads me to my next question. Is it possible to pass a column from an outer query to a subquery? For example, is there a way to do something like.SELECT owners.id AS owner_id, array(SELECT dogs.name WHERE o

Re: [SQL] Performance Problem with sub-select using array

2006-08-29 Thread Aaron Bono
Make sure you do a reply to all so you include the listOn 8/28/06, Travis Whitton <[EMAIL PROTECTED] > wrote:Ok, I actually got down to business with EXPLAIN ANALYZE. My performance was actually suffering from the DISTINCT in my SQL query and not the subquery, which I guess isn't run repeatedly

Re: [SQL] Performance Problem with sub-select using array

2006-08-27 Thread Aaron Bono
On 8/24/06, Travis Whitton <[EMAIL PROTECTED]> wrote: Hello all, I'm running the following query on about 6,000 records worth of data, and it takes about 8 seconds to complete. Can anyone provide any suggestions to improve performance? I have an index on two columns in the transacts table (program_

[SQL] Performance Problem with sub-select using array

2006-08-24 Thread Travis Whitton
Hello all, I'm running the following query on about 6,000 records worth of data, and it takes about 8 seconds to complete. Can anyone provide any suggestions to improve performance? I have an index on two columns in the transacts table (program_id, customer_id). If I specify a number for customer.i