Cost constants for operations done by the server.
More...
#include <opt_costconstants.h>
Cost constants for operations done by the server.
◆ Server_cost_constants()
Server_cost_constants::Server_cost_constants |
( |
Optimizer |
optimizer | ) |
|
|
inline |
Creates a server cost constants object with default values.
The default values of the cost constants are specified here.
- Parameters
-
optimizer | The type of optimizer to construct cost constants for. |
- Note
- The default cost constants are displayed in the default_value column of the mysql.server_cost tables. If any default value is changed, make sure to update the column definitions in mysql_system_tables.sql and mysql_system_tables_fix.sql.
◆ 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()
Set the value of one of the cost constants.
- Parameters
-
name | name of cost constant |
value | new value |
- Returns
- Status for updating the cost constant
◆ 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.
- Note
- Creating a MyISAM table is 20 times slower than creating a Memory table.
◆ 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.
- Note
- Generating MyISAM rows sequentially is 2 times slower than generating Memory rows, when number of rows is greater than 1000. However, we do not have benchmarks for very large tables, so setting this factor conservatively to be 5 times slower (ie the cost is 1.0).
◆ 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.
- Note
- Creating a Memory temporary table is by benchmark found to be as costly as writing 10 rows into the table.
◆ 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.
- Note
- Writing a row to or reading a row from a Memory temporary table is equivalent to evaluating a row in the join engine.
◆ m_row_evaluate_cost
double Server_cost_constants::m_row_evaluate_cost |
|
private |
Cost for evaluating the query condition on a row.
The documentation for this class was generated from the following files: