October 1, 2007 at 1:16 am
Hi
How to find Record length in a table in bytes
October 1, 2007 at 1:35 am
Jai (10/1/2007)
HiHow to find Record length in a table in bytes
You can calculate this yourself. The basic formula is along the lines of:
6 (status bits, .. header like stuff)
+ sum of fixed length column lengths (these you can get form sys.types)
+ 2 * (number of variable length columns)
+ ceiling (column number /8)
+ estimate for the variable length columns
If an estimate is enough have a look at a select * query and look at the execution plan (in Management Studio select the query and press Ctrl-L. Hover over the rightmost table or clustered index scan, and it will give you some estimations, including for the row length in bytes.
Regards,
Andras
October 1, 2007 at 2:12 am
Jai,
have a look at this post
http://www.sqlservercentral.com/Forums/Topic385732-9-1.aspx
It might help you with your question as well.
Markus
[font="Verdana"]Markus Bohse[/font]
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply