file keeps growing depsite being 50% empty

  • Jason is right here. I was asking for clarification to understand if you were talking logs or data.

    You should never shrink data files as part of regular maintenance. Ever. It's a waste of resources.

    If you have a large data purge, it makes sense as a one time event, but never as a regular process.

  • ok, back to my original issue:

    why would this file, which is 50% empty, keep growing? Is it due to the index rebuild alone needing to use all 50%+ (to subsequently release it when done), in which case there would be nothing I could do except let it grow?

    Reason I ask is that there may be a substantial data purge coming up and I dont want to shrink only to have it grow out again

  • Please run the query on this page and report back the results.

    http://jasonbrimhall.info/2011/12/05/database-data-and-log-size-info/

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • (just for the db in question, across all filegroups)

    DataFileSizeMB889676.125

    DataUsedMB507716

    DataFreeMB381960.125

    DataFreePercent42.93

    LogFileSizeMB1024.492188

    LogFileUsedMB49.36621094

    LogFreeSizeMB975.1259766

    LogUsedPercent4

    LogFreePercent96

  • Are you also rebuilding the clustered index?

    Cheers

    Leo

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

  • yes, all indexes

    the filegroup referenced in my original post contains only a table and its clustered index, the non-clustered indexes are in another filegroup

  • Does this table contain any (n)varchar(max) columns or xml columns?

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Out of curiosity, what is the data type for the CI? Are you using GUIDs at all?

  • no varchar(max), guid, etc -- all int, datetime, and decimal/numeric

  • CI is 3 columns -- 2 int and 1 datetime

Viewing 10 posts - 16 through 24 (of 24 total)

You must be logged in to reply to this topic. Login to reply