Join vs In  
Author Message
vaporvic





PostPosted: Wed Jun 23 06:50:51 CDT 2004 Top

SQL Server Developer >> Join vs In

We have a list of stores numbers(from 1 to 50) that we
create a temp table for and that joins with a table of
abount 7 million records. Will it be better(or the same)
to use in and a stringlist instead. Will SQL server 2000
be able to use the same indexes in a IN as with a JOIN ?

Thanks

Trond Kallerud
Silver Data as
Norway

SQL Server90  
 
 
Wayne





PostPosted: Wed Jun 23 06:50:51 CDT 2004 Top

SQL Server Developer >> Join vs In The simple answer is yes, SQL will be able to use the same indexes...
However that does not mean that the performance will be the same for a join
vs in...

For the answer to that, you must do some testing in your environment.

--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, C****te, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)

I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org



> We have a list of stores numbers(from 1 to 50) that we
> create a temp table for and that joins with a table of
> abount 7 million records. Will it be better(or the same)
> to use in and a stringlist instead. Will SQL server 2000
> be able to use the same indexes in a IN as with a JOIN ?
>
> Thanks
>
> Trond Kallerud
> Silver Data as
> Norway