I am having very basic doubt about db2 physical storage,

In planning pdf on page 109 or page 95 of the content.

It is mentioned there is maximum of 255 rows per page.

My Question is what does it mean ?

Does it mean that I cant have more than 255 rows in a page, if it is right.

How you can prove it.

I am taking the example of smallint as it takes least bytes to store.
================================================== ====================
create regular tablespace dms_4k1 pagesize 4k managed by database using (file 'e:\testdb\test.dbf4' 200) extentsize 4

create table test1 (sno smallint) in dms_4k1

smallint takes 2 Bytes of space + 1 Byte ( as it is nullable) + 10 Bytes (row overhead)
= 13 Bytes.

records per page =4028/13 = 309

i.e it will grab 2 pages to store 309 records.

which means 255 records will be placed in first page
and remaining (309 -255) 54 records will be placed in second page.

But when I am testing, It is grabbing second page on 181 record
i.e till 180 page it is inserting in first page,
and for 181th record it is grabbing second page.

Please correct me where I am wrong.

================================================== =====================

or can you site me an example where db2 store 255 records in one page and for 256th record it
grabs second page.

I appreciate your Quick response.


NB: I am working on db2 8 for w2k as well as AIX