Sqlserver-dba.com

SQL Server – Transaction Log files sequential

SQL Server Transactions Logs are written to as sequential. It doesn’t matter how many transaction log files exist for a database the log files will continue to be written in sequential order

 That’s straightforward for one database , but let’s look at the scenario where  50 databases exist on one drive. Are all Transaction log files  still being written to sequentially? Yes, each file is sequential – but continuous access to all the 50 log files will cause an overall random effect. 

It’s normally impractical to have 1 drive per transaction log file – so  a good strategy to consider is : a)identify the busiest transaction log files and isolate onto another drive

b)Group the transaction log files into more manageable IO profile grouping and isolate onto different drives

If a Tier 1 database exists and needs very fast access – isolate and place onto a separate drive – with the optimal performance settings on the throughput. This will allow multi paths to be exploited

 One method to gather workload on the Log files is to analyse the output of virtual file stats such as :

 SELECT mf.physical_name, db_name(dmiovfs.database_id) AS DatabaseName, dmiovfs.* FROM sys.dm_io_virtual_file_stats(null, null) dmiovfs

JOIN sys.master_files mf ON dmiovfs.database_id = mf.database_id AND dmiovfs.file_id = mf.file_id

ORDER BY dmiovfs.database_id, dmiovfs.file_id

Author: Jack Vamvas (http://www.sqlserver-dba.com)

Author: Jack Vamvas (http://www.sqlserver-dba.com)

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact