I have a table contains 100 columns and 2,000,000 records. when I am fetching records using stored procedure from that sometimes I am getting "The wait operation timed out." error.When I am alter stored procedure and then try to fetch records it will work fine.
Can anyone let me know what is the best solution for this ?
SP AS Following
CREATE PROC GetProducts @ClientId INT=NULL
AS
BEGIN
SELECT TOP 10 ClientId,
Field2,
Field3,
Field4,
Field5,
Field6,
Field7,
Field8,
Field9,
Field10
FROM ProductMaster
WHERE ClientId = @ClientId
ORDER BY Field1 DESC
END