SQL Undercover TV – Instant File Initialisation

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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: