On Sat, Mar 18, 2000 at 09:34:37PM -0500, Chris Gokey wrote:
>
> I was hoping that someone could help me optimize this query. This takes
> FOREVER under PostgreSQL.
>
> select distinct data_center, center_long from de_center where de_center.de_id
> in ( SELECT distinct de_parameters.de_id FROM de_parameters WHERE
> de_parameters.topic = 'ATMOSPHERE') order by data_center;
Not sure, but how about
select data_center, center_long from de_center
where exists
( SELECT * FROM de_parameters WHERE
de_parameters.topic = 'ATMOSPHERE'
and de_center.de_id = de_parameters.de_id
)
order by data_center;
?
(Wish I could test it first...)
Cheers,
Patrick