Outline • What is table-size-estimator • Why do I develop table-size-estimator? • CREATE TABLE Syntax • Subset of CREATE TABLE Syntax • How to calculate disk-size from CREATE TABLE • Limitations • Future work
PK and secondary index • Secondary IndexはLeaf nodeにPKの値を保持している https://dev.mysql.com/doc/refman/8.0/en/innodb-index-types.html http://nippondanji.blogspot.com/2010/10/innodb.html
Metadata for each record • Field Start Offsets • ⾏の各カラムが何バイト⽬で始まっ ているかを逆順で保持している • 1⾏のコンテンツ(全カラムの総 フィールドサイズ)が127byte以下で あれば1カラムごとに1byte, それ以 上であれば2byteが使われる https://dev.mysql.com/doc/internals/en/innodb-overview.html