Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Query optimze help

Author  Topic 

haroon2k9
Constraint Violating Yak Guru

328 Posts

Posted - 2011-01-11 : 03:27:57
Sorry for not clear abt my req.
sorry again

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-01-11 : 03:52:30
Please post table definitions, index definitions and, if possible, execution plan.
How long does it take to run? How large are the tables?

p.s. You don't need the distinct inside the IN subquery. It's ignored.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -