Adrian has a look at the performance benefits of instant file initialisation
Below is Ade’s auto growth script…
DECLARE @trcfilename VARCHAR(1000) ;
SELECT @trcfilename = path
FROM sys.traces
WHERE is_default = 1
SELECT StartTime ,
DB_NAME(DatabaseID) AS DatabaseName ,
FileName,
SUM(( IntegerData * 8 ) / 1024) AS [Growth (MB)] ,
( Duration / 1000 ) AS [Duration (ms)]
FROM ::fn_trace_gettable(@trcfilename, DEFAULT)
WHERE ( EventClass = 92
OR EventClass = 93
)
GROUP BY StartTime ,
DatabaseID ,
FileName ,
IntegerData ,
Duration
ORDER BY StartTime
Leave a Reply