SQL Server space related question

Sam 1,476 Reputation points
2023-08-22T19:48:30.8833333+00:00

Hi All,

I have a question about a disk space issue related to SQL Server. We have a 100 GB drive, with 90 GB being used space and 10 GB as free space. Within a span of two weeks, a log table has grown from 80 GB to 90 GB, but when we check the drive's free space, it still shows 10 GB available. I'm puzzled as I expected it to have filled the entire 100 GB drive.

Can anyone explain why we still see 90 GB used and only 10 GB free? Interested in any insights.

Regards,

Sam

SQL Server | Other
{count} votes

Answer accepted by question author
  1. Erland Sommarskog 129.6K Reputation points MVP Volunteer Moderator
    2023-08-22T21:23:14.3233333+00:00

    First question: is this table located on a filegroup that the file on this particular drive is part of? If the table is located elsewhere, there is no reason why this file would grow.

    And if this table is located on a filegroup, this file is part of, how many other files are there in that filegroup? Space is allocated in a round-robin fashion.

    But even if we assume that the table is located on a filegroup that is solely located on this drive, the file does not have to grow. If we assume that this table is the only one in this file and the table was 80GB and the file 90GB, there was room for 10GB more of data in the file. (But would the table continue to grow, we can expect the file to start growing and the amount of free space on the disk to decrease.)

    Also, keep in mind that a table may be located on multiple filegroups:

    • The table may be partitioned.
    • Indexes may be placed on a different filegroup than the data pages.
    • LOB data may be on a separate file group.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.