← Back to team overview

pbxt-discuss team mailing list archive

AVG_ROW_LENGTH computation

 

I'm trying to understand the computation listed on page 27 of the
downloaded slides from the MySQL Conference 2010.

Previously, it was recommended in a lp bug that "Average comp. rec. len"
should be used to save space and set as the AVG_ROW_LENGTH.

I get the part about "Byte size +1 of all columns".

How do you define the "Size of the Data log reference"?

Take this example; How can I obtain the optimal AVG_ROW_LENGTH to store
this data?
CREATE TABLE `audit` (
  `ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `RefID` int(11) unsigned NOT NULL,
  `AuditCatagory` varchar(64) NOT NULL,
  `UserID` varchar(64) NOT NULL,
  `Descript` text NOT NULL,
  `EntryDate` date NOT NULL,
  `EntryTime` time NOT NULL,
  `Comments` text NOT NULL,
  `Details` text NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `db_index` (`RefID`) USING BTREE,
  KEY `db_index_c` (`AuditCatagory`) USING BTREE
) ENGINE=PBXT AVG_ROW_LENGTH=124

CHECK TABLE: audit
Record buffer size      = 176
Fixed length rec. len.  = 174
Handle data record size = 138
Min/max header size     = 14/26
Min/avg/max record size = 23/1407/196762
Avg row len set for tab = 124
Rows fixed length       = NO
Maximum fixed size      = 65536
Minimum variable size   = 320
Minimum auto-increment  = 2485698
Number of columns       = 9
Number of fixed columns = 3
Columns req. for index  = 3
Rec len req. for index  = 4
Columns req. for blobs  = 0
Number of blob columns  = 0
Number of indices       = 3
Extendend data length   = 71393428
Minumum comp. rec. len. = 31
Average comp. rec. len. = 124
Maximum comp. rec. len. = 2316
Free record count       = 2
Deleted record count    = 0
Allocated record count  = 2211916




Follow ups