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

x
?
Solved

SQL Server Performance

Posted on 2007-03-21
3
Medium Priority
?
250 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article I will describe the Copy Database Wizard 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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

636 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