Subject Re: [ib-support] Re: Why is Firebird so slow?
Author Svein Erling Tysvaer
At 19:41 12.02.2003 +0000, you wrote:
>SELECT *
>FROM Media
>WHERE MKey IN (SELECT MKey FROM MediaItem WHERE IState = 5 GROUP BY
>Key

Dan,
change this to

SELECT <fields>
FROM Media M
WHERE EXISTS(SELECT 1 FROM MediaItem MI WHERE MI.MKey = M.MKey and
MI.IState = 5)

and your query will be very quick.

Set