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 2000 Forums
 SQL Server Development (2000)
 query tunning

Author  Topic 

venkatreddy.1911
Starting Member

1 Post

Posted - 2010-08-24 : 12:53:01
Hi,

We are using the below query in one of our stored procedure, it is working fine. But while it is retrieving the data from TempMissingApplied table, index scan is happening even though
there is cluster index on table TempMissingApplied on column custid.

But i want index seek on this table.

Please suggest me to make index scan as index seek.


SELECT tempM.CustID
FROM dbo.TempMissingAppliedWO tempM
INNER JOIN dbo.Segmentation S ON (tempM.CustID = S.CustID)

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-08-24 : 12:55:21
How many rows are there in the table?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-08-24 : 17:40:37
Why do you think the scan is a bad thing? Let me guess, the join is either hash join or merge join?
http://sqlinthewild.co.za/index.php/2009/07/29/is-a-scan-a-bad-thing/

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

- Advertisement -