|
drizzle
C++ MySQL-protocol-compatible database server
|
#include <position.h>
Public Member Functions | |
| Position (double in_records_read, double in_read_time, JoinTable *in_table, KeyUse *in_key, table_map in_ref_depend_map) | |
| Position (const Position &rhs) | |
| Position & | operator= (const Position &rhs) |
| bool | isConstTable () const |
| double | getFanout () const |
| void | setFanout (double in_records_read) |
| double | getCost () const |
| JoinTable * | getJoinTable () |
| bool | hasTableForSorting (Table *cmp_table) const |
| bool | examinePosition (table_map found_ref) |
| KeyUse * | getKeyUse () |
| table_map | getRefDependMap () const |
| void | clearRefDependMap () |
Private Attributes | |
| double | records_read |
| double | read_time |
| JoinTable * | table |
| KeyUse * | key |
| table_map | ref_depend_map |
Information about a position of table within a join order. Used in join optimization.
Definition at line 33 of file position.h.
|
inline |
Definition at line 37 of file position.h.
|
inline |
Definition at line 46 of file position.h.
|
inline |
Definition at line 59 of file position.h.
|
inline |
Definition at line 145 of file position.h.
| bool drizzled::optimizer::Position::examinePosition | ( | table_map | found_ref | ) |
Definition at line 30 of file position.cc.
|
inline |
Definition at line 111 of file position.h.
|
inline |
Definition at line 101 of file position.h.
|
inline |
Definition at line 116 of file position.h.
|
inline |
Definition at line 135 of file position.h.
|
inline |
Definition at line 140 of file position.h.
|
inline |
Check to see if the table attached to the JoinTable for this position has an index that can produce an ordering.
Definition at line 128 of file position.h.
|
inline |
Determine whether the table this particular position is representing in the query plan is a const table or not. A constant table is defined as (taken from the MySQL optimizer internals document on MySQL forge):
1) A table with zero rows, or with only one row 2) A table expression that is restricted with a WHERE condition
Based on the definition above, when records_read is set to 1.0 in the Position class, it infers that this position in the partial plan represents a const table.
Definition at line 96 of file position.h.
|
inline |
Definition at line 68 of file position.h.
|
inline |
Definition at line 106 of file position.h.
|
private |
NULL - 'index' or 'range' or 'index_merge' or 'ALL' access is used. Other - [eq_]ref[_or_null] access is used. Pointer to {t.keypart1 = expr}
Definition at line 172 of file position.h.
|
private |
Cost accessing the table in course of the entire complete join execution, i.e. cost of one access method use (e.g. 'range' or 'ref' scan ) times number the access method will be invoked.
Definition at line 164 of file position.h.
|
private |
The "fanout": number of output rows that will be produced (after pushed down selection condition is applied) per each row combination of previous tables. The value is an in-precise estimate.
Definition at line 157 of file position.h.
|
private |
If ref-based access is used: bitmap of tables this table depends on
Definition at line 175 of file position.h.
|
private |
Definition at line 166 of file position.h.