record size in modern non SE, databases
Posted in 2007
Topics: Triggers, Constraints & Referential Integrity
Hi All; Is the row size the actual size layed out on the disc drive/storage medium? In the SE I remember that each record was terminated. In trying to make each record start on a binary boundary, would something like int char(1) char(1) char(2) have sector size / 8 records, nice to the binary world ? This means I can keep each int ( foreign key to a primary one in several tables) on the 64 bit word. I have never worked out why there is no '.bin" in the "definition" world to pad records out to solve this. Correct ? Regards Ian
ian wrote: > Hi All; > > Is the row size the actual size layed out on the disc drive/storage > medium? Errrm, no, not necessarely. varchars have a byte count and are truncated. decimals, datetime and intervals are compressed. smart and dumb blobs only sport a descriptor, although to be fair, it's the descriptor size that's used to calculate the row size. raw types are aligned to word bundaries, ie padding is involved. and we haven't even gotten to to the fact that in IDS, information is stored in 'pages' which among other things have other information that describes them, and there are special 'pages' that are used to keep track of how the information is laid out on disk (oversimplifying thing considerably here) except that what I am talking about here is an engine that you are most probably not using! I guess, before anyone can give you an answer, you really need to be more specific about - which engine (if any) are you using, and - what are you trying to achieve. in general people care about the layout of tables on disk, not how each row is aligned. > > In the SE I remember that each record was terminated. > > In trying to make each record start on a binary boundary, would > something like > int > char(1) > char(1) > char(2) > have sector size / 8 records, nice to the binary world ? > This means I can keep each int ( foreign key to a primary one in > several tables) on the 64 bit word. > > I have never worked out why there is no '.bin" in the "definition" > world to pad records out to solve this. > > Correct ? > > Regards > Ian > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list > -- Ciao, Marco ______________________________________________________________________________ Marco Greco /UK /IBM Standard disclaimers apply! Structured Query Scripting Language http://www.4glworks.com/sqsl.htm 4glworks http://www.4glworks.com Informix on Linux http://www.4glworks.com/ifmxlinux.htm