[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: faster select



the "in" statement as written is slower, but I'm not sure what happens if
you add the "where master-shop = shop" to the "in" subquery.

Louisa Tripp
Norwich University
SysMan/Prog/NWMan/DBA

On Wed, 29 Jan 1997, Angel Guzman wrote:

> Which of these selects would be more efficient/faster in comparing
> data from two different databases?
>
>   from tt_shop
>  where department = $dept
>    and shop in (select master-shop from ldsloc.dbo.tt_shop)
> !  and exists  (select master-shop from ldsloc.dbo.tt_shop
> !                where master-shop = shop)
>  order by department, division, branch, shop
>
> Angel
>