MySQL 9.1.0
Source Code Documentation
|
Used to store optimizer cost estimates. More...
#include <handler.h>
Public Member Functions | |
Cost_estimate () | |
double | total_cost () const |
Returns sum of time-consuming costs, i.e., not counting memory cost. More... | |
double | get_io_cost () const |
double | get_cpu_cost () const |
double | get_import_cost () const |
double | get_mem_cost () const |
bool | is_zero () const |
Whether or not all costs in the object are zero. More... | |
bool | is_max_cost () const |
Whether or not the total cost is the maximal double. More... | |
void | reset () |
Reset all costs to zero. More... | |
void | set_max_cost () |
Set current cost to the maximal double. More... | |
void | multiply (double m) |
Multiply io, cpu and import costs by parameter. More... | |
Cost_estimate & | operator+= (const Cost_estimate &other) |
Cost_estimate | operator+ (const Cost_estimate &other) |
Cost_estimate | operator- (const Cost_estimate &other) |
bool | operator> (const Cost_estimate &other) const |
bool | operator< (const Cost_estimate &other) const |
void | add_io (double add_io_cost) |
Add to IO cost. More... | |
void | add_cpu (double add_cpu_cost) |
Add to CPU cost. More... | |
void | add_import (double add_import_cost) |
Add to import cost. More... | |
void | add_mem (double add_mem_cost) |
Add to memory cost. More... | |
Private Attributes | |
double | io_cost |
cost of I/O operations More... | |
double | cpu_cost |
cost of CPU operations More... | |
double | import_cost |
cost of remote operations More... | |
double | mem_cost |
memory used (bytes) More... | |
Used to store optimizer cost estimates.
The class consists of PODs only: default operator=, copy constructor and destructor are used.
|
inline |
|
inline |
Add to CPU cost.
|
inline |
Add to import cost.
|
inline |
Add to IO cost.
|
inline |
Add to memory cost.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Whether or not the total cost is the maximal double.
|
inline |
Whether or not all costs in the object are zero.
|
inline |
Multiply io, cpu and import costs by parameter.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Reset all costs to zero.
|
inline |
Set current cost to the maximal double.
|
inline |
Returns sum of time-consuming costs, i.e., not counting memory cost.
|
private |
cost of CPU operations
|
private |
cost of remote operations
|
private |
cost of I/O operations
|
private |
memory used (bytes)