Solved

Sloooow SQL 6

Posted on 1998-12-29
11
204 Views
Last Modified: 2010-03-19
Hi guys,

I am having this nasty problem since 4 months, and I'm quite sure
that I've tried everything to solve this but I will try this last
shoot.

I have here a Pentium II 300 Mhz processor 192 Mb memory HP LH Server
dedicated solely to run the SQL server and approximately 30-40 users
accessing it.
As far as we know we're not having any kind of problems with the
network bandwidth and the performace did improved when we upgraded the
processor but doesn't have changed much increasing the memory.
We've changed the SCSI controller twice but we didn't see any
significant improvement.
Since we cannot change the version due to a company policy, Any Ideas?
Tnks
Carlos
0
Comment
Question by:CarlosDR
  • 3
  • 2
  • 2
  • +4
11 Comments
 
LVL 2

Expert Comment

by:tschill120198
ID: 1092408
What do you define as "slow"?  What are the problems?
0
 

Author Comment

by:CarlosDR
ID: 1092409
"Slow" means that a given SP takes 3 minutes but sometimes it could take 9 or 11 and no one is working in something special that uses too hard the processor
0
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1092410
The best way to track down what is holding up the stored procedure is to use Performance Monitor to monitor the CPU, the network and SQL Server objects. You may want to also monitor the disk and memory just to see what numbers you are getting for them. These will tell you a lot of what is going on and where the bottlenecks are.

For example, if the CPU usage is high, then the process is CPU bound and the only thing that will make the process faster is to get a faster CPU. You may want to consider getting multiple CPUs for the computer. SQL Server is multithreaded so you will in general get better performance and throughput if you have multiple CPUs.

If the disk usage is high, you may want to also look at the memory to see why memory isn't used for caching. Perhaps a complex query is return a huge recordset, if this is the case, try finding a different query to return a smaller recordset.

I can guess until I'm completely out of ideas and I probably still won't be able to come up with a good guess unless you post some comments that indicate exactly what is going on with performance monitor.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 2

Expert Comment

by:tschill120198
ID: 1092411
1) Do all other sprocs and queries run slow?
2) Did this query run "ok" before 4 months ago?
0
 
LVL 1

Expert Comment

by:kponder
ID: 1092412
Can you post the stored procedure?
0
 
LVL 18

Expert Comment

by:mdougan
ID: 1092413
One other point, you didn't mention if the slow stored procs were doing updates or not.  If it is updating that is slow, then you might want to see if you have placed your log devices on the same physical drive as the data devices (bad idea).  You might also re-examine what options you have set for logging (as this can slow a procedure down considerably).

For Select type stored procedures, perhaps you are joining on columns that are not indexed?  Perhaps you are not using clustered indexes for your primary keys?  Perhaps you are joining on calculated columns?  Lots of things to look for.  Posting the procedure could help.
0
 

Author Comment

by:CarlosDR
ID: 1092414
I wasn't quite specific, I am talking about a SP that takes an amount of time and, when you run it later the same SP takes 2 or 3 times longer to execute, there is NO users doing something strange, the DB doesn´t grow (at least not significantly)
I will try to post one sample SP that is causing me trouble
0
 

Expert Comment

by:MagicJ
ID: 1092415
If u r doing any updates, inserts or delets then check ur Rollback segment size.
0
 
LVL 3

Expert Comment

by:cognition
ID: 1092416
Have you got any triggers, indexes. Are there queries inserting lots of records.

What is a typical transaction volume.

Are there multiple inserts/deletions/updates going on while users are in the system ?
0
 
LVL 3

Expert Comment

by:cognition
ID: 1092417
If you right click on the server in EM, and then choose configure, and then look at the configuratin tab, what setting do you have under memory. The default will only give SQL very limited memory. With 192 Mb you should be able to increase this to 78125. That should increase perfromance a lot.
0
 
LVL 3

Accepted Solution

by:
cognition earned 200 total points
ID: 1092418
If the sp is run against tables that are having a lot of inserts and deletes, then the query optimiser may be using the wrong values. You should update the statistics, and force a recomile on the sp using sp_recompile, or adding WITH RECOMPILE to the CREATE PREOCEDURE ... WITH RECOMPILE AS
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get Next number from Stored Procedure 8 23
install report service in sccm2012 3 19
SQL View / Qtry 3 12
Use column to search string column 2 11
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question