Is it possible to find out how big the data is in KB or MB for individual columns in a table? I have a script which tells me the physical size of each table, but I would like to know how much of that is taken up by certain columns in the database, especially when I have XML stored in a column.
Any help much appreciated
Cheers
You should be able to use the datalength function, something like
This will summate the datalengths of all the entries of that field in the table – it will not account for overheads such as variable length field pointers, space in the nullability bitmap etc.