Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sloooow SQL 6

Posted on 1998-12-29
11
Medium Priority
?
208 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
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 400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

610 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