Subject Re: [firebird-support] Re: SubSelect Question
Author Daniel Rail
Hi,

At November 10, 2003, 20:25, Tom Frey wrote:

> I just ran this query:

> SELECT (select avg(volume) from ABNTRADEDATA where volume >0), (select
> avg(volume) from abntradedata where volume <0) AVG_VOLUME from
> ABNTRADEDATA;

> and it took me 458seconds to execute? what's wrong here?

How many records do you have in the table ABNTRADEDATA? And, what
happens if you have an index on the field "VOLUME"(try ascending and
descending indices)?

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)