473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SQLExecute takes 100% CPU usage

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
Jul 20 '05 #1
2 4847
vishal (vi**************@mentorix.com) writes:
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.


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, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
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

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Philippe Trottier | last post by:
Hi! We developped a program with VS2003 and Enterprise Library. then we switched to VS2005B2 to check the conversion between these two. Everything works fine now except one thing! The sql...
5
by: Ken Brubaker | last post by:
Using DB2 8.1 FP5 on Win2000 After creating and configuring a new database, we stop db2 and start it again. We then launch our application and the SQLExecute calls start slowly and get...
2
by: wushupork | last post by:
I have written a screensaver application in C# .NET and have noticed that whenever the animation loop is running - CPU usage always spikes up close to 100%. My application uses a paint thread which...
1
by: Jerry Bujas | last post by:
Can someone explain, please, why it takes for a vc++ project (form application) comprising three forms about four miniutes to load at 100% CPU usage? When it finally loads and I want to run the...
11
by: David Schwartz | last post by:
When I run my VB.NET Windows Forms application, the CPU usage jumps up to 100%. If I drop-down a menu, the usage goes down to a more reasonable number, like 0-2%. The same is true when a MsgBox...
22
by: Paul | last post by:
Hi I am having a real issue with CPU usage by SQL Server, and it is not related to a poor query. I have a clients database that I am currently investigating some issues with. After I perform...
4
by: Paul | last post by:
Hi all Please read my previous post here if this interests you: ...
5
by: fniles | last post by:
I am having problem with thread. I have a Session class with public string variable (called Message) that I set from my Main program. In the session class it checks for the value of Message...
12
by: elty123 | last post by:
I have a small C# program (about 400 lines of code) that is only 28kb after compiled. However when it runs (takes a whole 5 seconds) it takes up nearly 20MB of memory and I don't see why. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.