My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Friends
AQP::Table_access Class Reference

#include <abstract_query_plan.h>

Inheritance diagram for AQP::Table_access:
Sql_alloc

List of all members.

Public Member Functions

const Join_planget_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 Itemget_key_field (uint field_no) const
const KEY_PART_INFOget_key_part_info (uint field_no) const
uint get_access_no () const
int get_index_no () const
TABLEget_table () const
double get_fanout () const
Item_equalget_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 *)

Detailed Description

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.


Member Function Documentation

Write an entry in the trace file about the contents of this object.

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

uint AQP::Table_access::get_access_no ( ) const [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.)

Get the type of this operation.

int AQP::Table_access::get_index_no ( ) const [inline]
Returns:
The number of the index to use for this access operation ( or -1 for non-index operations).
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'

const Join_plan * AQP::Table_access::get_join_plan ( ) const [inline]

Get the Join_plan that this Table_access belongs to.

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'.

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.

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.

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.

const char * AQP::Table_access::get_other_access_reason ( ) const [inline]

Get a description of the reason for getting access_type==AT_OTHER. To be used for informational messages.

Returns:
A string that should be assumed to have the same life time as the Table_access object.

Get the table that this operation accesses.

Check if the results from this operation will joined with results from the next operation using a join buffer (instead of plain nested loop).

Returns:
True if using a join buffer.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines