Need SQL Script/Logic to size an identified subset of a table

Database

Need SQL Script/Logic to size an identified subset of a table

I am attempting to do some forecasting related to an archiving project, however, I don't know how to size a subset of the table.

For example, Table A has a 15 month online policy. Therefore, on a monthly basis, we will archive one month worth of data. By doing a simple count(*) function, I can get a row count but I want to know how many bytes/GB's I will be removing from the table on a monthly basis.

Please provide a SQL script/logic that will assist me in this query.

thanks
1 REPLY
Enthusiast

Re: Need SQL Script/Logic to size an identified subset of a table

One way i can think of is query dbc.tablesize before and after archiving the table. This should tell you how many GB you removed to archive.