1#ifndef OPT_COSTMODEL_INCLUDED
2#define OPT_COSTMODEL_INCLUDED
193 double write_rows,
double read_rows)
const {
195 assert(write_rows >= 0.0);
196 assert(read_rows >= 0.0);
308 assert(blocks >= 0.0);
324 assert(blocks >= 0.0);
389 assert(seek_blocks >= 0.0);
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
Set of all cost constants used by the server and all storage engines.
Definition: opt_costconstants.h:435
API for getting cost estimates for server operations that are not directly related to a table object.
Definition: opt_costmodel.h:54
double disk_tmptable_create_cost() const
Cost of creating a temporary table using a disk based storage engine.
Definition: opt_costmodel.h:140
enum_tmptable_type
Temporary table types that the cost model differentiate between.
Definition: opt_costmodel.h:59
@ DISK_TMPTABLE
Definition: opt_costmodel.h:59
@ MEMORY_TMPTABLE
Definition: opt_costmodel.h:59
void init(Optimizer optimizer)
Initialize the cost model object for a query.
Definition: opt_costmodel.cc:45
bool m_initialized
Used for detecting if this object is used without having been initialized.
Definition: opt_costmodel.h:231
double tmptable_create_cost(enum_tmptable_type tmptable_type) const
Cost estimate for creating a temporary table.
Definition: opt_costmodel.h:174
virtual ~Cost_model_server()
Destructor for Cost_model_server objects.
Definition: opt_costmodel.cc:36
Cost_model_server()
Definition: opt_costmodel.h:61
double key_compare_cost(double keys) const
Cost of doing a number of key compare operations.
Definition: opt_costmodel.h:112
double disk_tmptable_row_cost() const
Cost of storing or retrieving a row using a disk based storage engine.
Definition: opt_costmodel.h:148
double row_evaluate_cost(double rows) const
Cost of processing a number of records and evaluating the query condition on the records.
Definition: opt_costmodel.h:98
double memory_tmptable_create_cost() const
Cost of creating a temporary table in the memory storage engine.
Definition: opt_costmodel.h:124
double tmptable_readwrite_cost(enum_tmptable_type tmptable_type, double write_rows, double read_rows) const
Cost estimate for inserting and reading records from a temporary table.
Definition: opt_costmodel.h:192
const Server_cost_constants * m_server_cost_constants
Definition: opt_costmodel.h:225
double memory_tmptable_row_cost() const
Cost of storing or retrieving a row using the memory storage engine.
Definition: opt_costmodel.h:132
const Cost_model_constants * m_cost_constants
Cost constants to use in cost calculations.
Definition: opt_costmodel.h:217
const Cost_model_constants * get_cost_constants() const
Return a pointer to the object containing the current cost constants.
Definition: opt_costmodel.h:209
double tmptable_row_cost(enum_tmptable_type tmptable_type) const
Cost estimate for a row operation (insert, read) on a temporary table.
Definition: opt_costmodel.h:160
API for getting cost estimates for operations on table data.
Definition: opt_costmodel.h:242
const TABLE * m_table
The table that this is the cost model for.
Definition: opt_costmodel.h:418
double io_block_read_cost(double blocks) const
Cost of reading a number of random blocks from a table.
Definition: opt_costmodel.h:306
const Cost_model_server * m_cost_model_server
Pointer to the cost model for the query.
Definition: opt_costmodel.h:402
double buffer_block_read_cost(double blocks) const
Cost of reading a number of blocks from the storage engine when the block is already in a memory buff...
Definition: opt_costmodel.h:322
double page_read_cost(double pages) const
Cost of reading a number of random pages from a table.
Definition: opt_costmodel.cc:86
double page_read_cost_index(uint index, double pages) const
Cost of reading a number of random pages from an index.
Definition: opt_costmodel.cc:102
const SE_cost_constants * m_se_cost_constants
Cost constants for the storage engine that stores the table.
Definition: opt_costmodel.h:407
Cost_model_table()
Definition: opt_costmodel.h:244
double disk_seek_base_cost() const
The fixed part of the cost for doing a sequential seek on disk.
Definition: opt_costmodel.h:357
double row_evaluate_cost(double rows) const
Cost of processing a number of records and evaluating the query condition on the records.
Definition: opt_costmodel.h:276
void init(const Cost_model_server *cost_model_server, const TABLE *table)
Initializes the cost model object.
Definition: opt_costmodel.cc:68
bool m_initialized
Used for detecting if this object is used without having been initialized.
Definition: opt_costmodel.h:413
double disk_seek_cost(double seek_blocks) const
Cost estimate for a sequential disk seek where a given number of blocks are skipped.
Definition: opt_costmodel.h:388
double disk_seek_prop_cost() const
The cost for seeking past one block in a sequential seek.
Definition: opt_costmodel.h:374
double key_compare_cost(double keys) const
Cost of doing a number of key compare operations.
Definition: opt_costmodel.h:291
Cost constants for a storage engine.
Definition: opt_costconstants.h:208
double memory_block_read_cost() const
Cost of reading one random block from an in-memory database buffer.
Definition: opt_costconstants.h:248
double io_block_read_cost() const
Cost of reading one random block from disk.
Definition: opt_costconstants.h:254
Cost constants for operations done by the server.
Definition: opt_costconstants.h:66
double row_evaluate_cost() const
Cost for evaluating the query condition on a row.
Definition: opt_costconstants.h:109
double disk_temptable_row_cost() const
Cost for retrieving or storing a row in an internal disk resident temporary table.
Definition: opt_costconstants.h:143
double memory_temptable_create_cost() const
Cost for creating an internal temporary table in memory.
Definition: opt_costconstants.h:119
double memory_temptable_row_cost() const
Cost for retrieving or storing a row in an internal temporary table stored in memory.
Definition: opt_costconstants.h:127
double disk_temptable_create_cost() const
Cost for creating an internal temporary table in a disk resident storage engine.
Definition: opt_costconstants.h:135
double key_compare_cost() const
Cost for comparing two keys.
Definition: opt_costconstants.h:114
static uint keys
Definition: hp_test2.cc:49
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Optimizer
Definition: opt_costconstants.h:39
constexpr const double DISK_SEEK_BASE_COST
Definition: opt_costmodel.h:43
constexpr const double DISK_SEEK_PROP_COST
Definition: opt_costmodel.h:45
constexpr const int BLOCKS_IN_AVG_SEEK
Definition: opt_costmodel.h:44