MySQL 8.0.37
Source Code Documentation
Server_cost_constants Class Reference

Cost constants for operations done by the server. More...

#include <opt_costconstants.h>

Public Member Functions

 Server_cost_constants ()
 Creates a server cost constants object using the default values defined in this class. More...
 
double row_evaluate_cost () const
 Cost for evaluating the query condition on a row. More...
 
double key_compare_cost () const
 Cost for comparing two keys. More...
 
double memory_temptable_create_cost () const
 Cost for creating an internal temporary table in memory. More...
 
double memory_temptable_row_cost () const
 Cost for retrieving or storing a row in an internal temporary table stored in memory. More...
 
double disk_temptable_create_cost () const
 Cost for creating an internal temporary table in a disk resident storage engine. More...
 
double disk_temptable_row_cost () const
 Cost for retrieving or storing a row in an internal disk resident temporary table. More...
 
cost_constant_error set (const LEX_CSTRING &name, const double value)
 Set the value of one of the cost constants. More...
 

Private Attributes

double m_row_evaluate_cost
 Cost for evaluating the query condition on a row. More...
 
double m_key_compare_cost
 Cost for comparing two keys. More...
 
double m_memory_temptable_create_cost
 Cost for creating an internal temporary table in memory. More...
 
double m_memory_temptable_row_cost
 Cost for retrieving or storing a row in an internal temporary table stored in memory. More...
 
double m_disk_temptable_create_cost
 Cost for creating an internal temporary table in a disk resident storage engine. More...
 
double m_disk_temptable_row_cost
 Cost for retrieving or storing a row in an internal disk resident temporary table. More...
 

Static Private Attributes

static const double ROW_EVALUATE_COST = 0.1
 Default cost for evaluation of the query condition for a row. More...
 
static const double KEY_COMPARE_COST = 0.05
 Default cost for comparing row ids. More...
 
static const double MEMORY_TEMPTABLE_CREATE_COST = 1.0
 Cost for creating a memory temporary table. More...
 
static const double MEMORY_TEMPTABLE_ROW_COST = 0.1
 Cost for inserting or reading a row in a memory temporary table. More...
 
static const double DISK_TEMPTABLE_CREATE_COST = 20.0
 Cost for creating a disk temporary table. More...
 
static const double DISK_TEMPTABLE_ROW_COST = 0.5
 Cost for inserting or reading a row in a disk temporary table. More...
 

Detailed Description

Cost constants for operations done by the server.

Constructor & Destructor Documentation

◆ Server_cost_constants()

Server_cost_constants::Server_cost_constants ( )
inline

Creates a server cost constants object using the default values defined in this class.

Member Function Documentation

◆ disk_temptable_create_cost()

double Server_cost_constants::disk_temptable_create_cost ( ) const
inline

Cost for creating an internal temporary table in a disk resident storage engine.

◆ disk_temptable_row_cost()

double Server_cost_constants::disk_temptable_row_cost ( ) const
inline

Cost for retrieving or storing a row in an internal disk resident temporary table.

◆ key_compare_cost()

double Server_cost_constants::key_compare_cost ( ) const
inline

Cost for comparing two keys.

◆ memory_temptable_create_cost()

double Server_cost_constants::memory_temptable_create_cost ( ) const
inline

Cost for creating an internal temporary table in memory.

◆ memory_temptable_row_cost()

double Server_cost_constants::memory_temptable_row_cost ( ) const
inline

Cost for retrieving or storing a row in an internal temporary table stored in memory.

◆ row_evaluate_cost()

double Server_cost_constants::row_evaluate_cost ( ) const
inline

Cost for evaluating the query condition on a row.

◆ set()

cost_constant_error Server_cost_constants::set ( const LEX_CSTRING name,
const double  value 
)

Set the value of one of the cost constants.

Parameters
namename of cost constant
valuenew value
Returns
Status for updating the cost constant

Member Data Documentation

◆ DISK_TEMPTABLE_CREATE_COST

const double Server_cost_constants::DISK_TEMPTABLE_CREATE_COST = 20.0
staticprivate

Cost for creating a disk temporary table.

◆ DISK_TEMPTABLE_ROW_COST

const double Server_cost_constants::DISK_TEMPTABLE_ROW_COST = 0.5
staticprivate

Cost for inserting or reading a row in a disk temporary table.

◆ KEY_COMPARE_COST

const double Server_cost_constants::KEY_COMPARE_COST = 0.05
staticprivate

Default cost for comparing row ids.

◆ m_disk_temptable_create_cost

double Server_cost_constants::m_disk_temptable_create_cost
private

Cost for creating an internal temporary table in a disk resident storage engine.

◆ m_disk_temptable_row_cost

double Server_cost_constants::m_disk_temptable_row_cost
private

Cost for retrieving or storing a row in an internal disk resident temporary table.

◆ m_key_compare_cost

double Server_cost_constants::m_key_compare_cost
private

Cost for comparing two keys.

◆ m_memory_temptable_create_cost

double Server_cost_constants::m_memory_temptable_create_cost
private

Cost for creating an internal temporary table in memory.

◆ m_memory_temptable_row_cost

double Server_cost_constants::m_memory_temptable_row_cost
private

Cost for retrieving or storing a row in an internal temporary table stored in memory.

◆ m_row_evaluate_cost

double Server_cost_constants::m_row_evaluate_cost
private

Cost for evaluating the query condition on a row.

◆ MEMORY_TEMPTABLE_CREATE_COST

const double Server_cost_constants::MEMORY_TEMPTABLE_CREATE_COST = 1.0
staticprivate

Cost for creating a memory temporary table.

◆ MEMORY_TEMPTABLE_ROW_COST

const double Server_cost_constants::MEMORY_TEMPTABLE_ROW_COST = 0.1
staticprivate

Cost for inserting or reading a row in a memory temporary table.

◆ ROW_EVALUATE_COST

const double Server_cost_constants::ROW_EVALUATE_COST = 0.1
staticprivate

Default cost for evaluation of the query condition for a row.


The documentation for this class was generated from the following files: