I have got below records in SQL Profiler if my proc is called.
CPU – 78, Reads – 3508, Writes – 0, Duration – 81
Is above data is ok for concurrent hits for 70 person on my website, My proc is called on evey page the user is visiting, the performance monitor on my server shows anonmyous user hit keep increasing when I enable my SQL proc calling.
Please suggest what and where I can look!!, my proc query is given below:
ALTER PROCEDURE [dbo].[GETDataFromLinkInfo]
-- Add the parameters for the stored procedure here
(@PageID INT)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT DISTINCT [PUBLICATION_ID] AS n,
[URL] AS u
FROM [LINK_INFO] WITH(NOLOCK)
WHERE Page_ID = @PageID
AND Component_Template_Priority > 0
AND PUBLICATION_ID NOT IN( 232, 481 )
ORDER BY URL
FOR XML RAW ('p'), ROOT ('ps');
RETURN
END
Execute the proc 1000 times and measure how long it took. This is the most important metric to judge performance (time elapsed). Don’t measure reads and writes.
Regarding my advice not to look at reads/writes: Reads, however, can either be cached or non-cached which is a huge difference. I always look at the execution plan to see why a query is behaving the way it is and what do to. The read/write metrics neither tell you if you need to act nor what do to.