CPU usage corresponds more to SQL Server system processes, so if you first get a list of processes, you can check the CPU cycles they use and then hopefully you can work out which queries correspond to which processes.
Running this query against the master database should show the CPU:
- Code: Select all
SELECT * FROM sysprocesses
If you just want to see if the query is optimal, you can use the SQL Server Profiler (that comes with SQL Server's management tools) and run the query through the execution plan wizard and that should tell you if you can improve the query.