Just a hunch... Some of your fields will get rounded up to the nearest word size. Assume word size to be 8 bytes.
So you would have 5*8 for your big ints 3*8 for your small ints 14 rounded to nearest word size = 24 Plus 16 bytes for the pointer to the rest of the varchar. And 16 for the time stamp That would give you 130 bytes. But hey whatdo I know? I'm just shooting from the hip on my crackberry. Sent via BlackBerry. -Mike Segel Principal MSCC 312 952 8175 -----Original Message----- From: S <[EMAIL PROTECTED]> Date: Fri, 3 Nov 2006 03:01:29 To:[email protected] Subject: table size estimation This is a follow up email to my earlier posting regarding storage. Based on the query given, select * from NEW org.apache.derby.diag.SpaceTable('SYS','SYSTABLES') AS x; using it for my table, the estimated size of a record is coming to be 131 bytes. The table consists of 5 bigints, 3 smallints, 1 timestamp and a varchar. The avg length of the varchar is 14chars. So, total size of the record size should have been 5*8+3*2+14+(bytes for timestamp)+any additional per field/record data all put together shouldn't be more than 70/80 bytes. So, why am I getting 131 bytes?
