Where's the rest of the space used in this table?

Posted by Eric H. on Stack Overflow See other posts from Stack Overflow or by Eric H.
Published on 2010-06-07T13:40:47Z Indexed on 2010/06/07 13:52 UTC
Read the original article Hit count: 167

Filed under:

I'm using SQL Server 2005.

I have a table whose row size should be 124 bytes. It's all ints or floats, no NULL columns (so everything is fixed width).

There is only one index, clustered. The fill factor is 0.

After inserting a ton of data, sp_spaceused returns the following

name            rows        reserved           data               index_size         unused
OHLC_Bar_Trl    117076054   29807664 KB        29711624 KB        92344 KB           3696 KB

which shows a rowsize of approx (29807664*1024)/117076054 = 260 bytes/row.

Where's the rest of the space?

Is there some DBCC command I need to run to tighten up this table (I could not insert the rows in correct index order, so maybe it's just internal fragmentation)?

© Stack Overflow or respective owner

Related posts about sql-server