On Mon, Jul 29, 2002 at 05:16:40PM +0200, frank_lupo wrote:
> select id,de2 from irtab where id in (select distinct(ruolofunz) from
> irelbtes_1 where entpian=118331)\g
Don't use IN. It's slow. Try this:
select id,de2 from irtab where exists (select distinct(ruolofunz)
from irelbtes_1 where entpian=118331 and ruolofunz=id)
Or maybe
select distinct on (ruolofunz) id, de2 from irtab, irelbtes_1 where
id = ruolofunz and entpian=118331
A
--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M6K 3E3
+1 416 646 3304 x110