Regarding Row Alignment on Even Bytes!!

Database

Regarding Row Alignment on Even Bytes!!

Hi,

It has been mentioned in the Database Design PDF that Rows are always assigned on even bytes.

The reason given was that there will be a performance penalty when rows are not aligned.

Can someone explain more clearly the reason behind storing rows on even bytes?

Regards,
Annal T
2 REPLIES

Re: Regarding Row Alignment on Even Bytes!!

The even-byte alignment rule is not for performance. It is due to a constraint on row addressing within the data block. Space in each data block is managed as a heap, i.e., the physical order of rows is arbitrary. The "reference array" at the top of the block points to the rows in sorted order. The offset pointers in this array are only 16 bits, but the maximum block size is almost 128 KB, so reference values are multiplied by 2 to derive the byte offset. Consequently, odd row offsets are not supported.

Re: Regarding Row Alignment on Even Bytes!!

Hi Jim,

Thanks for explaining it clearly!!!!