Solved

SQL Server Performance

Posted on 2007-03-21
3
237 Views
Last Modified: 2010-03-19
We had a SQL Server 2000 Server running on a Windows 2003 Server with 4GB of RAM, RAID 5.  We were experiencing slow performance.  So we purchased a new Windows 2003 Server with 4GB of RAM, RAID 5, and upgraded to SQL Server 2005.

The applications seem to read from the databases fine, but saving records is slow, sometimes, even causing the application to stop responding.

Any help here, I am new to SQL Server and don't even know where to begin.

Thank you.
0
Comment
Question by:ourguru
[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
  • 2
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18765785
this is usually one of 2 issues:
* SQL Server is allowed to take ALL the RAM, and hence the os/sql server start swapping
or, more probable here:
* your transaction log files are growing endlessy, without getting cleared.
here some explanations in regards to transaction logs:

  the transaction log is (in short) a circular buffer.
  every transaction is written to it.
  every transaction that has been backed up or truncated from the transaction log can be overwritten.
    -> hence, you either need a regular transaction log backup, or the database to be in simple recovery mode (be aware of the consequences)

  so, if you have a large .ldf file, you did have your database in full recovery mode, but "never" issued the transaction log backup.
    -> to avoid large .ldf file, see above.

  once the backup is in place, or the database in simple recovery mode, you can start shrinking the ldf file.
    -> note: put a correct size for it, so that even the largest transaction of your applications on that database can fit.
  if the shrink does not work straight away, this is because some non-cleared/active transactions are still in the file, usually and the end of the file  
    -> remember, the log file is a circular buffer.
  to solve that, simply run some transactions on the database (or wait for some to be run), and retry the shrink operation.
 

0
 

Author Comment

by:ourguru
ID: 18766002
My database is 4.5GB, and my LDF is 2.5GB.  I have them set to backup the LDF every night, but they stay around 2.5GB.

Is there any formula to estimate the amount of Memory needed for SQL Server.  Like a 4.5GB DB should have 6GB of RAM?
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 18766062
> I have them set to backup the LDF every night,
how? online backup (ie transaction log backup), I assume

> but they stay around 2.5GB
that should be fine. as long as the file does not grow, there is no indication of problem...

>Is there any formula to estimate the amount of Memory needed for SQL Server.
no. of course, the more, the better, but the max RAM you need is the size of the db itself (+a bit of overhead for the running programs, including sql server itself).
but that is usually not needed/possible.

check the performance counters to determine the bottleneck during the problems, like disk write contention...

check the execution plans of the update queries, see if you have eventually full table scans of clustered index scans. if that is the case, you are missing index(es)...

0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

707 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