1#ifndef OPT_COSTMODEL_INCLUDED
2#define OPT_COSTMODEL_INCLUDED
191 double write_rows,
double read_rows)
const {
193 assert(write_rows >= 0.0);
194 assert(read_rows >= 0.0);
306 assert(blocks >= 0.0);
322 assert(blocks >= 0.0);
387 assert(seek_blocks >= 0.0);
Set of all cost constants used by the server and all storage engines.
Definition: opt_costconstants.h:417
API for getting cost estimates for server operations that are not directly related to a table object.
Definition: opt_costmodel.h:52
double disk_tmptable_create_cost() const
Cost of creating a temporary table using a disk based storage engine.
Definition: opt_costmodel.h:138
enum_tmptable_type
Temporary table types that the cost model differentiate between.
Definition: opt_costmodel.h:57
@ DISK_TMPTABLE
Definition: opt_costmodel.h:57
@ MEMORY_TMPTABLE
Definition: opt_costmodel.h:57
void init()
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:229
double tmptable_create_cost(enum_tmptable_type tmptable_type) const
Cost estimate for creating a temporary table.
Definition: opt_costmodel.h:172
virtual ~Cost_model_server()
Destructor for Cost_model_server objects.
Definition: opt_costmodel.cc:36
Cost_model_server()
Definition: opt_costmodel.h:59
double key_compare_cost(double keys) const
Cost of doing a number of key compare operations.
Definition: opt_costmodel.h:110
double disk_tmptable_row_cost() const
Cost of storing or retrieving a row using a disk based storage engine.
Definition: opt_costmodel.h:146
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:95
double memory_tmptable_create_cost() const
Cost of creating a temporary table in the memory storage engine.
Definition: opt_costmodel.h:122
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:190
const Server_cost_constants * m_server_cost_constants
Definition: opt_costmodel.h:223
double memory_tmptable_row_cost() const
Cost of storing or retrieving a row using the memory storage engine.
Definition: opt_costmodel.h:130
const Cost_model_constants * m_cost_constants
Cost constants to use in cost calculations.
Definition: opt_costmodel.h:215
const Cost_model_constants * get_cost_constants() const
Return a pointer to the object containing the current cost constants.
Definition: opt_costmodel.h:207
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:158
API for getting cost estimates for operations on table data.
Definition: opt_costmodel.h:240
const TABLE * m_table
The table that this is the cost model for.
Definition: opt_costmodel.h:416
double io_block_read_cost(double blocks) const
Cost of reading a number of random blocks from a table.
Definition: opt_costmodel.h:304
const Cost_model_server * m_cost_model_server
Pointer to the cost model for the query.
Definition: opt_costmodel.h:400
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:320
double page_read_cost(double pages) const
Cost of reading a number of random pages from a table.
Definition: opt_costmodel.cc:79
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:95
const SE_cost_constants * m_se_cost_constants
Cost constants for the storage engine that stores the table.
Definition: opt_costmodel.h:405
Cost_model_table()
Definition: opt_costmodel.h:242
double disk_seek_base_cost() const
The fixed part of the cost for doing a sequential seek on disk.
Definition: opt_costmodel.h:355
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:274
void init(const Cost_model_server *cost_model_server, const TABLE *table)
Initializes the cost model object.
Definition: opt_costmodel.cc:61
bool m_initialized
Used for detecting if this object is used without having been initialized.
Definition: opt_costmodel.h:411
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:386
double disk_seek_prop_cost() const
The cost for seeking past one block in a sequential seek.
Definition: opt_costmodel.h:372
double key_compare_cost(double keys) const
Cost of doing a number of key compare operations.
Definition: opt_costmodel.h:289
Cost constants for a storage engine.
Definition: opt_costconstants.h:197
double memory_block_read_cost() const
Cost of reading one random block from an in-memory database buffer.
Definition: opt_costconstants.h:211
double io_block_read_cost() const
Cost of reading one random block from disk.
Definition: opt_costconstants.h:217
Cost constants for operations done by the server.
Definition: opt_costconstants.h:64
double row_evaluate_cost() const
Cost for evaluating the query condition on a row.
Definition: opt_costconstants.h:81
double disk_temptable_row_cost() const
Cost for retrieving or storing a row in an internal disk resident temporary table.
Definition: opt_costconstants.h:115
double memory_temptable_create_cost() const
Cost for creating an internal temporary table in memory.
Definition: opt_costconstants.h:91
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:99
double disk_temptable_create_cost() const
Cost for creating an internal temporary table in a disk resident storage engine.
Definition: opt_costconstants.h:107
double key_compare_cost() const
Cost for comparing two keys.
Definition: opt_costconstants.h:86
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
static uint keys
Definition: hp_test2.cc:46
constexpr const double DISK_SEEK_BASE_COST
Definition: opt_costmodel.h:41
constexpr const double DISK_SEEK_PROP_COST
Definition: opt_costmodel.h:43
constexpr const int BLOCKS_IN_AVG_SEEK
Definition: opt_costmodel.h:42
unsigned int uint
Definition: uca9-dump.cc:75