Truncating T-Logs = Performace Improvements??

  • Hi,

    I've heard that truncating & shrinking your Transaction logs will help improve database server performance. Why is this? Any thoughts?

    Many thanks. Jeff

  • truncating & shrinking log is to reduce virtual log file number.

    If log files grow to a large size through many small increments, that can slow down recovery.

    SQL Server by default, tries to maintain a small number of virtual files.

  • Jeff

    Be careful with this.  I don't know what environment you're in but here's a few things to think about.

    1. Transaction logs are your avenue for database recovery.  If you can restore from a disaster using last night's backup, great.  If you can't afford to lose the activity done during the day, these logs are essential.

    2. If you truncate and shrink the log file, then the activity afterwards fills up the log file and causes it to grow (assuming "autogrow=true") then you're forcing SQL to wait to log that "next" transaction while the OS has to make the file grow.  This may cause the physical log file to be fragmented also.

    If logs aren't important, set the recovery mode to Simple.

    Cheers,

    Ken

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply