Estimate the size of non-spatial columns

You can estimate the row size of fixed-sized columns by querying the systables system catalog table. You must estimate the average size of variable length columns.

To determine the size of the remaining columns of a spatial table, create the table without the spatial column and query the rowsize column of the systables table. In this example, a table called lots is created with three columns:
create table lots (lot_id integer,
                   owner_name varchar(128),
                   owner_address varchar(128))
Selecting the row size for the lots table from systables returns a value of 262 bytes:
select rowsize from systables where tabname = 'lots';

262

Tables containing variable length columns of type VARCHAR or NVARCHAR require the row size to be reduced to reflect the actual length of the data stored. In this example, the owner_name and owner_address columns are variable length VARCHAR columns and can occupy up to 129 bytes each (128 bytes for data plus an extra byte for the null terminator). The average size of the owner name is actually 68 bytes, and the average size of the address is 102 bytes. Therefore, the estimated row size should be reduced to 174 bytes.