Solved

Sloooow SQL 6

Posted on 1998-12-29
11
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

690 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