cancel
Showing results for 
Search instead for 
Did you mean: 

How to estimate the size of a delete statement?

Former Member
0 Kudos

Good morning,

I'd like to know if there are any ways to estimate the size of a table after a delete statement.

Let's say I have a table table_A with 1000000 rows and sized 10Gb (info retrieved from sp_spaceused table_A)

I know I'm going to delete 350000 rows and I'd like to estimate the size of my final table, how can I proceed?

Can I just do a mathematical rule to estimate the size?

Should I use optdiag ouput to know the size of a row and 'x' by number of rows?

Thanks

Simon

former_member185199
Contributor
0 Kudos

great answer mark!!!

do you also switched over from ISUG email channels?

Mark_A_Parsons
Contributor
0 Kudos

Yep, ISUG (ASE/REP) discussion forums are (as far as I'm concerned) dead.

former_member185199
Contributor
0 Kudos

Same for me, but i hope some stay longer there , i think you you know what i mean

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Mark and Bret for your answers.

the only way to know is to test

former_member188958
Active Contributor
0 Kudos

If you will follow up the delete with a REORG REBUILD of the data, you can use the sp_estspace procedure to get an estimate of the table size.  (it assumes minimal fragmentation, which is all that variability Mark described so well).

-bret