views:

14

answers:

1

I have a table which I think might be better off if it uses different data types for many of the columns. I wish to design some tests to determine the pay off in disc space if these columns are switched to better data types. How can I determine how much disc space a table is taking up in ASE 15.0?

A: 
1> sp_spaceused TableName
2> go
 name                 rowtotal    reserved        data            index_size      unused
 -------------------- ----------- --------------- --------------- --------------- ---------------
 TableName            5530288     5975116 KB      5537552 KB      392292 KB       45272 KB

I'm not aware of anything that will give you a breakdown by column though. Using sp_help against the table does give you a list of all the columns, and their Length. I think that indicates the amount of storage the column could use.

There are methods of estimating table size using sp_estspace, but I've never tried these.

AdamH