If your application is running on the same machine as SQL Server, use
taskmgr to identify the process consuming the CPU. If sqlservr.exe is the
culprit, some query tuning is probably needed. You can examine the
execution plan using Query Analyzer and
modify the proc and/or experiment with indexes to make it more efficient.
If your client application is consuming the CPU, a large result may be to
blame as Erland indicated.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"vishal" <vi**************@mentorix.com> wrote in message
news:f1**************************@posting.google.c om...
Hi
I a am executing a stored procedure from C code using SQLExecute . It
takes some time to Execute the procedure. However when I see the
processor usage during that time it shows 100% cpu usage.
Can anyone tell me why SQLExecute uses 100% CPU when running the
stored proceudre.
Thanks
vishal