MySQL 9.3.0
Source Code Documentation
BytesPerTableRow Struct Reference

This struct represents the number of bytes we expect to read for a table row. More...

#include <cost_model.h>

Public Attributes

int64_t record_bytes
 The number of bytes read from the B-tree record. More...
 
int64_t overflow_bytes
 The number of bytes read from overflow pages. More...
 
double overflow_probability
 

Detailed Description

This struct represents the number of bytes we expect to read for a table row.

Note that the split between b-tree and overflow pages is specific to InnoDB and may not be a good fit for other storage engines. Ideally we should calculate row size and IO-cost in the handler, in a way that is specific to each particular storage engine. When using the DYNAMIC row format, an InnoDB B-tree record cannot be bigger than about half a page. (The default page size is 16KB). Above that, the longest fields are stored in separate overflow pages.

Member Data Documentation

◆ overflow_bytes

int64_t BytesPerTableRow::overflow_bytes

The number of bytes read from overflow pages.

This is the combined size of those long variable-sized fields that are in the projection but stored in overflow pages.

◆ overflow_probability

double BytesPerTableRow::overflow_probability

◆ record_bytes

int64_t BytesPerTableRow::record_bytes

The number of bytes read from the B-tree record.

This also includes those fields that were not in the projection.


The documentation for this struct was generated from the following file: