Data File Size Stays Same Whereas Log File Size Is Increasing I am using the following snippet to track the data and log file size increase after certain operations:

SELECT @SQL = STUFF((
    SELECT '
    USE [' + d.name + ']
    INSERT INTO #space (database_id, data_used_size, log_used_size)
    SELECT
          DB_ID()
        , SUM(CASE WHEN [type] = 0 THEN space_used END)
        , SUM(CASE WHEN [type] = 1 THEN space_used END)
    FROM (
        SELECT s.[type], space_used = SUM(FILEPROPERTY(s.name, ''SpaceUsed'') * 8)
        FROM sys.database_files s
        GROUP BY s.[type]
    ) t;'
    FROM sys.databases d
    WHERE d.[state] = 0
    FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'), 1, 2, '')

EXEC sys.sp_executesql @SQL


The problem is, after each write operation, log file size increases as expected but the data file size stays the same for 4 or five operations and then suddenly increases. 

Why would this be?
Probably because the function FILEPROPERTY reports either whole pages user or even whole extents used (documentation is unclear on which, but that detail doesn't really matter). The point is that storage inside the database file is pre-allocated for data. That means that some storage is pre-allocated and now you have free space that can accommodate some new rows until it has to grow the next time. This pre-allocation inside the database files doesn't really happen in a transaction log file - at least not the level that FILEPROPERTY reports on.