Thoughts on InnoDB Record Format

I’m reading more about some of the InnoDB internals as I’m about to start working on a new database on the order of 1-5TB of memory.

I want to make sure everything is tight and well represented on disk.

Here are some random thoughts.

– If the table has a suffix of potentially NULLable columns it should be possible to just omit these in the field definition. It’s a tough trade off though as one would need to use a few bits extra to terminate the field list (or represent the length of the field list).

– The ‘extra bytes’ section could optionally omit the ‘next 16 bits’ pointer to the next page on disk and shave off 2 bytes of storage per record. This might not seem like a lot but I’m trying to store millions of short records per box. These are from 16-24 bits in length. Another 16 bits is a significant data overhead. These records are mostly fixed so being able to omit the next page pointer can really help use memory more efficiently. It seems like there are a few reserved bits that can be used for this purpose.

%d bloggers like this: