Monday, June 9

How to get physical size of a row ?

What is the physical row size of my table ?

If you observe, the output of the sp_help myTable, the third column ( Length ) indicates the physical length for each of the columns. That means, to get the physical length of a row, we need the sum of these values.

We can query syscolumns table, to get the physical size of a row, as below.

--#Get the physical row size for a table 'myTable'
select sum(length) from syscolumns where id = object_id('myTable')

0 comments:





Disclaimer :
Unless, otherwise mentioned, TF's SQL tips/tricks are for Sybase ASE 12.5.x