MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Cost_estimate Class Reference

#include <handler.h>

Public Member Functions

double total_cost () const
 Returns sum of time-consuming costs, i.e., not counting memory cost.
double get_io_cost () const
double get_cpu_cost () const
double get_import_cost () const
double get_mem_cost () const
bool is_zero () const
void reset ()
 Reset all costs to zero.
void multiply (double m)
 Multiply io, cpu and import costs by parameter.
Cost_estimateoperator+= (const Cost_estimate &other)
Cost_estimate operator+ (const Cost_estimate &other)
void add_io (double add_io_cost)
 Add to IO cost.
void add_cpu (double add_cpu_cost)
 Add to CPU cost.
void add_import (double add_import_cost)
 Add to import cost.
void add_mem (double add_mem_cost)
 Add to memory cost.

Static Public Member Functions

static double IO_BLOCK_READ_COST ()
 The cost of one I/O operation.

Detailed Description

Used to store optimizer cost estimates.

The class consists of PODs only: default operator=, copy constructor and destructor are used.

Definition at line 1536 of file handler.h.

Member Function Documentation

bool Cost_estimate::is_zero ( ) const
inline

Whether or not all costs in the object are zero

Returns
true if all costs are zero, false otherwise

Definition at line 1568 of file handler.h.

Here is the caller graph for this function:


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