#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 |
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.
Referenced by drizzled::best_extension_by_limited_search(), and drizzled::optimize_straight_join().
|
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.
References records_read.
Referenced by drizzled::best_extension_by_limited_search().
|
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.
Referenced by isConstTable().
|
private |
If ref-based access is used: bitmap of tables this table depends on
Definition at line 175 of file position.h.