all groups > sql server (alternate) > august 2004 >
You're in the

sql server (alternate)

group:

SQLExecute takes 100% CPU usage



SQLExecute takes 100% CPU usage vishal.karkhanis NO[at]SPAM mentorix.com
8/31/2004 1:01:08 AM
sql server (alternate): 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
Re: SQLExecute takes 100% CPU usage Erland Sommarskog
8/31/2004 10:37:53 AM
vishal (vishal.karkhanis@mentorix.com) writes:
[quoted text, click to view]

Too little information to say anything useful. The only thing I can think
of is that the stored procedure produecs a huge result set.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
Re: SQLExecute takes 100% CPU usage Dan Guzman
8/31/2004 1:21:08 PM
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

[quoted text, click to view]

AddThis Social Bookmark Button