Hi
I have two same sql databases on different servers but one one of the server database a stored procedure is executing with index scan for particular select statement in side the procedure. But other server the same select statement using the index seek. On that particular column the unique non clustered index created.
Due to the index scan the procedure execution is taking long time. I am not able figure out why the same procedure behaving differently on different servers.
The select query inside the procedure also very simple and its just the count of the row for example
select @a = count(1) from dbo.table_name where alternate_id = @a_key
can you please help me what is the wrong on other sever? is there any settings need to be modify in SQL Server?
Thanks in advance!
Thanks
Surendra