Posted on 2014-08-12
I have a website that has SQL Server Db as back end. I found that the CPU usage was more than normal. I found a SQL code to show most CPU consuming query I fixed some of them and it return noticeable amount of CPU Usage.
The only SQL code that I dont know how to get it optimized to not use too much CPU redources is this one:
SELECT top 5 [ID], [Title], [Details],[IPhoto] FROM [qryWords] WHERE lang=1 and id<> 59476 and [Title] like N'%no%' order by id desc
Note: qryWord is a view and the SQL code is as following:
SELECT word, ID, Title, Details, Visible, Lang, IPhoto
WHERE (Visible = 1) AND (Lang = 1)
Do you have any Idea how can I tune this query to use as low as CPU resources?