MySQL 5.6.14 Source Code Document
|
#include <abstract_query_plan.h>
Public Member Functions | |
const Join_plan * | get_join_plan () const |
enum_access_type | get_access_type () const |
const char * | get_other_access_reason () const |
enum_join_type | get_join_type (const Table_access *parent) const |
uint | get_no_of_key_fields () const |
const Item * | get_key_field (uint field_no) const |
const KEY_PART_INFO * | get_key_part_info (uint field_no) const |
uint | get_access_no () const |
int | get_index_no () const |
TABLE * | get_table () const |
double | get_fanout () const |
Item_equal * | get_item_equal (const Item_field *field_item) const |
void | dbug_print () const |
bool | uses_join_cache () const |
bool | filesort_before_join () const |
Friends | |
class | Join_plan |
bool | equal (const Table_access *, const Table_access *) |
Additional Inherited Members | |
Static Public Member Functions inherited from Sql_alloc | |
static void * | operator new (size_t size) throw () |
static void * | operator new[] (size_t size) throw () |
static void * | operator new[] (size_t size, MEM_ROOT *mem_root) throw () |
static void * | operator new (size_t size, MEM_ROOT *mem_root) throw () |
static void | operator delete (void *ptr, size_t size) |
static void | operator delete (void *ptr, MEM_ROOT *mem_root) |
static void | operator delete[] (void *ptr, MEM_ROOT *mem_root) |
static void | operator delete[] (void *ptr, size_t size) |
This class represents an access operation on a table, such as a table scan, or a scan or lookup via an index. A Table_access object is always owned by a Join_plan object, such that the life time of the Table_access object ends when the life time of the owning Join_plan object ends.
Definition at line 168 of file abstract_query_plan.h.
void AQP::Table_access::dbug_print | ( | ) | const |
Write an entry in the trace file about the contents of this object.
Definition at line 208 of file abstract_query_plan.cc.
bool AQP::Table_access::filesort_before_join | ( | ) | const |
Check if this table will be presorted to an intermediate record storage before it is joined with its siblings.
Table will be presorted before joining with child tables, if: 1) This is the first non-const table 2) There are more tables to be joined 3) It is not already decide to write entire join result to temp. 4a) The GROUP BY is 'simple' and does not match an orderd index 4b) The ORDER BY is 'simple' and does not match an orderd index
A 'simple' order/group by contain only column references to the first non-const table
Definition at line 449 of file abstract_query_plan.cc.
|
inline |
Get the number of this Table_access within the enclosing Join_plan. (This number will be in the range 0 to Join_plan::get_access_count() - 1.)
Definition at line 297 of file abstract_query_plan.h.
|
inline |
Get the type of this operation.
Definition at line 261 of file abstract_query_plan.h.
|
inline |
Definition at line 285 of file abstract_query_plan.h.
Item_equal * AQP::Table_access::get_item_equal | ( | const Item_field * | field_item | ) | const |
Get the Item_equal's set relevant for the specified 'Item_field'
Definition at line 191 of file abstract_query_plan.cc.
|
inline |
Get the Join_plan that this Table_access belongs to.
Definition at line 255 of file abstract_query_plan.h.
enum_join_type AQP::Table_access::get_join_type | ( | const Table_access * | predecessor | ) | const |
Determine join type between this table access and some other table access that preceeds it in the join plan..
Fall Through: 'this' is a member in an outer join, but 'predecessor' may still be embedded in the same inner join as 'this'.
Definition at line 71 of file abstract_query_plan.cc.
const Item * AQP::Table_access::get_key_field | ( | uint | field_no | ) | const |
Get the field_no'th key values for this operation. It is an error to call this method on an operation that is not an index lookup operation.
Definition at line 128 of file abstract_query_plan.cc.
const KEY_PART_INFO * AQP::Table_access::get_key_part_info | ( | uint | field_no | ) | const |
Get the field_no'th KEY_PART_INFO for this operation. It is an error to call this method on an operation that is not an index lookup operation.
Definition at line 139 of file abstract_query_plan.cc.
uint AQP::Table_access::get_no_of_key_fields | ( | ) | const |
Get the number of key values for this operation. It is an error to call this method on an operation that is not an index lookup operation.
Definition at line 113 of file abstract_query_plan.cc.
|
inline |
Get a description of the reason for getting access_type==AT_OTHER. To be used for informational messages.
Definition at line 274 of file abstract_query_plan.h.
TABLE * AQP::Table_access::get_table | ( | ) | const |
Get the table that this operation accesses.
Definition at line 149 of file abstract_query_plan.cc.
bool AQP::Table_access::uses_join_cache | ( | ) | const |
Check if the results from this operation will joined with results from the next operation using a join buffer (instead of plain nested loop).
Definition at line 440 of file abstract_query_plan.cc.