4

For a company that I have been helping troubleshoot their database.

In SQL Server 2000, database is about 120 gig.

Something caused the transaction log to grow MUCH larger than normal to over 100 gig, some hung transaction that didn't commit or roll back for a few days. That has been resolved and it now stays around 1% full or less, due to its hourly transaction log backups.

It IS my understanding that a GROWING transaction log file size can cause performance issues.

But what I am a little paranoid about is the size. Although mainly empty, MIGHT it be having a negative effect on performance? But I haven't found any documentation that suggests this is true.

I did find this link: http://www.bigresource.com/MS_SQL-Large-Transaction-Log-dramatically-Slows-down-processing-any-idea-why--2ahzP5wK.html but in this post I can't tell if their log was full or empty, and there is not any replies to the post in this link.

So I am guessing it is not a problem, anyone know for sure?

Mafu Josh
  • 143
  • 4

2 Answers2

2

What you'll probably find is that because the tlog has grown to such a large size on its own because autogrow was turned on, you'll have a lot of virtual log files. This means the transaction log itself is fragmented and this isn't a good thing.
Here's some information on how you can check how many vlog files the database has.
Here's a blog on why lots of virtual log files are bad & what you need to do about it.

Nick Kavadias
  • 10,758
  • 7
  • 36
  • 47
1

When you backup, SQL Server will truncate your log files and create an initial log file. In your situation it sounds like you should greatly reduce your log file. Try to determine how much data is written to your log between your backup windows and then may double or triple the amount. Set that as your initial log file size. This will help prevent fragmentation performance issues.

Growning your log file by 1MB increments when your average transaction is 2MB is going to be very bad for performance. Growing 400MB twice a day probably won't make a noticable difference in performance.

I highly recommend reading this article's section on Data and Log file management. It will help you make better educated decisions about your issue.

citadelgrad
  • 716
  • 6
  • 12