Drizzled Public API Documentation

drizzled::optimizer::QuickGroupMinMaxSelect Class Reference

#include <quick_group_min_max_select.h>

Inheritance diagram for drizzled::optimizer::QuickGroupMinMaxSelect:
drizzled::optimizer::QuickSelectInterface

Public Types

enum  {
  QS_TYPE_RANGE = 0, QS_TYPE_INDEX_MERGE = 1, QS_TYPE_RANGE_DESC = 2, QS_TYPE_ROR_INTERSECT = 4,
  QS_TYPE_ROR_UNION = 5, QS_TYPE_GROUP_MIN_MAX = 6
}

Public Member Functions

 QuickGroupMinMaxSelect (Table *table, Join *join, bool have_min, bool have_max, KeyPartInfo *min_max_arg_part, uint32_t group_prefix_len, uint32_t group_key_parts, uint32_t used_key_parts, KeyInfo *index_info, uint use_index, double read_cost, ha_rows records, uint key_infix_len, unsigned char *key_infix, memory::Root *parent_alloc)
bool add_range (SEL_ARG *sel_range)
void update_key_stat ()
void adjust_prefix_ranges ()
bool alloc_buffers ()
int init ()
int reset ()
int get_next ()
bool reverse_sorted () const
bool unique_key_range () const
int get_type () const
void add_keys_and_lengths (std::string *key_names, std::string *used_lengths)
virtual void range_end ()
virtual int init_ror_merged_scan (bool)
virtual void save_last_pos ()
virtual void add_info_string (std::string *)
virtual bool is_keys_used (const boost::dynamic_bitset<> &fields)

Public Attributes

memory::Root alloc
QuickRangeSelectquick_prefix_select
bool sorted
ha_rows records
double read_time
Tablehead
uint32_t index
uint32_t max_used_key_length
uint32_t used_key_parts
unsigned char * last_rowid

Private Member Functions

int next_prefix ()
int next_min_in_range ()
int next_max_in_range ()
int next_min ()
int next_max ()
void update_min_result ()
void update_max_result ()

Private Attributes

Cursorcursor
Joinjoin
KeyInfoindex_info
unsigned char * record
unsigned char * tmp_record
unsigned char * group_prefix
uint32_t group_prefix_len
uint32_t group_key_parts
unsigned char * last_prefix
bool have_min
bool have_max
bool seen_first_key
KeyPartInfomin_max_arg_part
uint32_t min_max_arg_len
unsigned char * key_infix
uint32_t key_infix_len
std::vector< QuickRange * > min_max_ranges
uint32_t real_prefix_len
uint32_t real_key_parts
List< Item_sum > * min_functions
List< Item_sum > * max_functions
List< Item_sum >::iterator * min_functions_it
List< Item_sum >::iterator * max_functions_it

Detailed Description

Index scan for GROUP-BY queries with MIN/MAX aggregate functions.

This class provides a specialized index access method for GROUP-BY queries of the forms:

 SELECT A_1,...,A_k, [B_1,...,B_m], [MIN(C)], [MAX(C)]
   FROM T
  WHERE [RNG(A_1,...,A_p ; where p <= k)]
   [AND EQ(B_1,...,B_m)]
   [AND PC(C)]
   [AND PA(A_i1,...,A_iq)]
 GROUP BY A_1,...,A_k;

or

SELECT DISTINCT A_i1,...,A_ik FROM T WHERE [RNG(A_1,...,A_p ; where p <= k)] [AND PA(A_i1,...,A_iq)];

where all selected fields are parts of the same index. The class of queries that can be processed by this quick select is fully specified in the description of get_best_trp_group_min_max() in optimizer/range.cc.

The get_next() method directly produces result tuples, thus obviating the need to call end_send_group() because all grouping is already done inside get_next().

Since one of the requirements is that all select fields are part of the same index, this class produces only index keys, and not complete records.

Definition at line 64 of file quick_group_min_max_select.h.

Member Function Documentation

virtual void drizzled::optimizer::QuickSelectInterface::add_info_string ( std::string *  )
inlinevirtualinherited

Append text representation of quick select structure (what and how is merged) to str. The result is added to "Extra" field in EXPLAIN output.

Note

This function is implemented only by quick selects that merge other quick selects output and/or can produce output suitable for merging.

Reimplemented in drizzled::optimizer::QuickRangeSelect, drizzled::optimizer::QuickIndexMergeSelect, drizzled::optimizer::QuickRorIntersectSelect, and drizzled::optimizer::QuickRorUnionSelect.

Definition at line 241 of file range.h.

Referenced by drizzled::optimizer::QuickRorUnionSelect::add_info_string().

void drizzled::optimizer::QuickGroupMinMaxSelect::add_keys_and_lengths ( std::string *  key_names,
std::string *  used_lengths 
)
virtual

Append comma-separated list of keys this quick select uses to key_names; append comma-separated list of corresponding used lengths to used_lengths.

SYNOPSIS QuickGroupMinMaxSelect::add_keys_and_lengths()

Parameters
[out]key_namesNames of used indexes
[out]used_lengthsCorresponding lengths of the index names

DESCRIPTION This method is used by select_describe to extract the names of the indexes used by a quick select.

Implements drizzled::optimizer::QuickSelectInterface.

Definition at line 695 of file quick_group_min_max_select.cc.

References index_info, and drizzled::optimizer::QuickSelectInterface::max_used_key_length.

bool drizzled::optimizer::QuickGroupMinMaxSelect::add_range ( SEL_ARG sel_range)

Eventually create and add a new quick range object.

SYNOPSIS QuickGroupMinMaxSelect::add_range()

Parameters
[in]sel_rangeRange object from which a new object is created

NOTES Construct a new QuickRange object from a SEL_ARG object, and add it to the array min_max_ranges. If sel_arg is an infinite range, e.g. (x < 5 or x > 4), then skip it and do not construct a quick range.

RETURN

Return values
falseon success
trueotherwise

Definition at line 163 of file quick_group_min_max_select.cc.

References min_max_arg_len, and min_max_ranges.

void drizzled::optimizer::QuickGroupMinMaxSelect::adjust_prefix_ranges ( )

Opens the ranges if there are more conditions in quick_prefix_select than the ones used for jumping through the prefixes.

SYNOPSIS QuickGroupMinMaxSelect::adjust_prefix_ranges()

NOTES quick_prefix_select is made over the conditions on the whole key. It defines a number of ranges of length x. However when jumping through the prefixes we use only the the first few most significant keyparts in the range key. However if there are more keyparts to follow the ones we are using we must make the condition on the key inclusive (because x < "ab" means x[0] < 'a' OR (x[0] == 'a' AND x[1] < 'b'). To achive the above we must turn off the NEAR_MIN/NEAR_MAX

Definition at line 196 of file quick_group_min_max_select.cc.

References drizzled::optimizer::QuickSelectInterface::max_used_key_length, quick_prefix_select, and drizzled::optimizer::QuickRangeSelect::ranges.

int drizzled::optimizer::QuickGroupMinMaxSelect::get_next ( )
virtual

Get the next key containing the MIN and/or MAX key for the next group.

SYNOPSIS QuickGroupMinMaxSelect::get_next()

DESCRIPTION The method finds the next subsequent group of records that satisfies the query conditions and finds the keys that contain the MIN/MAX values for the key part referenced by the MIN/MAX function(s). Once a group and its MIN/MAX values are found, store these values in the Item_sum objects for the MIN/MAX functions. The rest of the values in the result row are stored in the Item_field::result_field of each select field. If the query does not contain MIN and/or MAX functions, then the function only finds the group prefix, which is a query answer itself.

NOTES If both MIN and MAX are computed, then we use the fact that if there is no MIN key, there can't be a MAX key as well, so we can skip looking for a MAX key in this case.

RETURN

Return values
0on success
HA_ERR_END_OF_FILEif returned all keys
otherif some error occurred

Implements drizzled::optimizer::QuickSelectInterface.

Definition at line 271 of file quick_group_min_max_select.cc.

References drizzled::copy_fields(), cursor, group_prefix, group_prefix_len, have_max, have_min, index_info, drizzled::Cursor::index_read_map(), join, drizzled::key_cmp(), last_prefix, next_max(), next_min(), next_prefix(), real_key_parts, record, update_max_result(), and update_min_result().

int drizzled::optimizer::QuickGroupMinMaxSelect::get_type ( ) const
inlinevirtual

Returns the type of this quick select - one of the QS_TYPE_* values

Implements drizzled::optimizer::QuickSelectInterface.

Definition at line 434 of file quick_group_min_max_select.h.

int drizzled::optimizer::QuickGroupMinMaxSelect::init ( )
virtual

Do post-constructor initialization.

SYNOPSIS QuickGroupMinMaxSelect::init()

DESCRIPTION The method performs initialization that cannot be done in the constructor such as memory allocations that may fail. It allocates memory for the group prefix and inifix buffers, and for the lists of MIN/MAX item to be updated during execution.

RETURN

Return values
0OK
otherError code

Implements drizzled::optimizer::QuickSelectInterface.

Definition at line 99 of file quick_group_min_max_select.cc.

References alloc, drizzled::memory::Root::alloc(), group_prefix, group_prefix_len, have_max, have_min, join, key_infix, last_prefix, min_max_arg_len, and real_prefix_len.

virtual int drizzled::optimizer::QuickSelectInterface::init_ror_merged_scan ( bool  )
inlinevirtualinherited

Initialize this quick select as a merged scan inside a ROR-union or a ROR- intersection scan. The caller must not additionally call init() if this function is called.

Parameters
Iftrue, the quick select may use table->Cursor, otherwise it must create and use a separate Cursor object.
Return values
0Ok
otherError

Reimplemented in drizzled::optimizer::QuickRangeSelect, and drizzled::optimizer::QuickRorIntersectSelect.

Definition at line 212 of file range.h.

Referenced by drizzled::optimizer::QuickRorUnionSelect::reset().

bool drizzled::optimizer::QuickSelectInterface::is_keys_used ( const boost::dynamic_bitset<> &  fields)
virtualinherited

Returns true if any index used by this quick select uses field which is marked in passed bitmap.

Reimplemented in drizzled::optimizer::QuickIndexMergeSelect, drizzled::optimizer::QuickRorIntersectSelect, and drizzled::optimizer::QuickRorUnionSelect.

Definition at line 4125 of file range.cc.

Referenced by drizzled::optimizer::QuickRorUnionSelect::is_keys_used(), and drizzled::update_query().

int drizzled::optimizer::QuickGroupMinMaxSelect::next_max ( )
private

Retrieve the maximal key in the next group.

SYNOPSIS QuickGroupMinMaxSelect::next_max()

DESCRIPTION Lookup the maximal key of the group, and store it into this->record.

RETURN

Return values
0on success
HA_ERR_KEY_NOT_FOUNDif no MAX key was found that fulfills all conditions.
HA_ERR_END_OF_FILE- "" -
otherif some error occurred

Definition at line 416 of file quick_group_min_max_select.cc.

References cursor, group_prefix, drizzled::Cursor::index_read_map(), min_max_ranges, next_max_in_range(), real_key_parts, and record.

Referenced by get_next().

int drizzled::optimizer::QuickGroupMinMaxSelect::next_max_in_range ( )
private

Find the maximal key in a group that satisfies some range conditions for the min/max argument field.

SYNOPSIS QuickGroupMinMaxSelect::next_max_in_range()

DESCRIPTION Given the sequence of ranges min_max_ranges, find the maximal key that is in the right-most possible range. If there is no such key, then the current group does not have a MAX key that satisfies the WHERE clause. If a key is found, its value is stored in this->record.

RETURN

Return values
0on success
HA_ERR_KEY_NOT_FOUNDif there is no key with the given prefix in any of the ranges
HA_ERR_END_OF_FILE- "" -
otherif some error

Definition at line 589 of file quick_group_min_max_select.cc.

References cursor, group_prefix, index_info, drizzled::Cursor::index_read_map(), drizzled::key_cmp(), min_max_arg_len, min_max_ranges, real_key_parts, real_prefix_len, and record.

Referenced by next_max().

int drizzled::optimizer::QuickGroupMinMaxSelect::next_min ( )
private

Retrieve the minimal key in the next group.

SYNOPSIS QuickGroupMinMaxSelect::next_min()

DESCRIPTION Find the minimal key within this group such that the key satisfies the query conditions and NULL semantics. The found key is loaded into this->record.

IMPLEMENTATION Depending on the values of min_max_ranges.elements, key_infix_len, and whether there is a NULL in the MIN field, this function may directly return without any data access. In this case we use the key loaded into this->record by the call to this->next_prefix() just before this call.

RETURN

Return values
0on success
HA_ERR_KEY_NOT_FOUNDif no MIN key was found that fulfills all conditions.
HA_ERR_END_OF_FILE- "" -
otherif some error occurred

Definition at line 351 of file quick_group_min_max_select.cc.

References cursor, group_prefix, index_info, drizzled::Cursor::index_read_map(), drizzled::key_cmp(), min_max_ranges, next_min_in_range(), real_key_parts, real_prefix_len, record, and tmp_record.

Referenced by get_next().

int drizzled::optimizer::QuickGroupMinMaxSelect::next_min_in_range ( )
private

Find the minimal key in a group that satisfies some range conditions for the min/max argument field.

SYNOPSIS QuickGroupMinMaxSelect::next_min_in_range()

DESCRIPTION Given the sequence of ranges min_max_ranges, find the minimal key that is in the left-most possible range. If there is no such key, then the current group does not have a MIN key that satisfies the WHERE clause. If a key is found, its value is stored in this->record.

RETURN

Return values
0on success
HA_ERR_KEY_NOT_FOUNDif there is no key with the given prefix in any of the ranges
HA_ERR_END_OF_FILE- "" -
otherif some error

Definition at line 471 of file quick_group_min_max_select.cc.

References cursor, group_prefix, index_info, drizzled::Cursor::index_read_map(), drizzled::key_cmp(), min_max_arg_len, min_max_ranges, real_key_parts, real_prefix_len, record, and tmp_record.

Referenced by next_min().

int drizzled::optimizer::QuickGroupMinMaxSelect::next_prefix ( )
private

Determine the prefix of the next group.

SYNOPSIS QuickGroupMinMaxSelect::next_prefix()

DESCRIPTION Determine the prefix of the next group that satisfies the query conditions. If there is a range condition referencing the group attributes, use a QuickRangeSelect object to retrieve the first key that satisfies the condition. If there is a key infix of constants, append this infix immediately after the group attributes. The possibly extended prefix is stored in this->group_prefix. The first key of the found group is stored in this->record, on which relies this->next_min().

RETURN

Return values
0on success
HA_ERR_KEY_NOT_FOUNDif there is no key with the formed prefix
HA_ERR_END_OF_FILEif there are no more keys
otherif some error occurred

Definition at line 425 of file quick_group_min_max_select.cc.

References cursor, drizzled::optimizer::QuickRangeSelect::get_next_prefix(), group_key_parts, group_prefix, group_prefix_len, index_info, drizzled::Cursor::index_read_map(), key_infix, quick_prefix_select, record, and seen_first_key.

Referenced by get_next().

virtual void drizzled::optimizer::QuickSelectInterface::range_end ( )
inlinevirtualinherited

Range end should be called when we have looped over the whole index

Reimplemented in drizzled::optimizer::QuickRangeSelect.

Definition at line 176 of file range.h.

int drizzled::optimizer::QuickGroupMinMaxSelect::reset ( void  )
virtual

Initialize a quick group min/max select for key retrieval.

SYNOPSIS QuickGroupMinMaxSelect::reset()

DESCRIPTION Initialize the index chosen for access and find and store the prefix of the last group. The method is expensive since it performs disk access.

RETURN

Return values
0OK
otherError code

Implements drizzled::optimizer::QuickSelectInterface.

Definition at line 252 of file quick_group_min_max_select.cc.

References cursor, group_prefix_len, drizzled::optimizer::QuickSelectInterface::index, index_info, last_prefix, quick_prefix_select, record, and drizzled::optimizer::QuickRangeSelect::reset().

virtual void drizzled::optimizer::QuickSelectInterface::save_last_pos ( )
inlinevirtualinherited

Save ROWID of last retrieved row in file->ref. This used in ROR-merging.

Reimplemented in drizzled::optimizer::QuickRangeSelect.

Definition at line 221 of file range.h.

Referenced by drizzled::optimizer::QuickRorUnionSelect::get_next(), and drizzled::optimizer::QuickRorUnionSelect::reset().

void drizzled::optimizer::QuickGroupMinMaxSelect::update_key_stat ( )

Determine the total number and length of the keys that will be used for index lookup.

SYNOPSIS QuickGroupMinMaxSelect::update_key_stat()

DESCRIPTION The total length of the keys used for index lookup depends on whether there are any predicates referencing the min/max argument, and/or if the min/max argument field can be NULL. This function does an optimistic analysis whether the search key might be extended by a constant for the min/max keypart. It is 'optimistic' because during actual execution it may happen that a particular range is skipped, and then a shorter key will be used. However this is data dependent and can't be easily estimated here.

RETURN None

Definition at line 208 of file quick_group_min_max_select.cc.

References have_max, have_min, drizzled::optimizer::QuickSelectInterface::max_used_key_length, min_max_arg_len, min_max_ranges, real_prefix_len, and drizzled::optimizer::QuickSelectInterface::used_key_parts.

void drizzled::optimizer::QuickGroupMinMaxSelect::update_max_result ( )
private

Update all MAX function results with the newly found value.

SYNOPSIS QuickGroupMinMaxSelect::update_max_result()

DESCRIPTION The method iterates through all MAX functions and updates the result value of each function by calling Item_sum::reset(), which in turn picks the new result value from this->head->getInsertRecord(), previously updated by next_max(). The updated value is stored in a member variable of each of the Item_sum objects, depending on the value type.

IMPLEMENTATION The update must be done separately for MIN and MAX, immediately after next_max() was called, because both MIN and MAX take their result value from the same buffer this->head->getInsertRecord() (i.e. this->record).

RETURN None

Definition at line 687 of file quick_group_min_max_select.cc.

Referenced by get_next().

void drizzled::optimizer::QuickGroupMinMaxSelect::update_min_result ( )
private

Update all MIN function results with the newly found value.

SYNOPSIS QuickGroupMinMaxSelect::update_min_result()

DESCRIPTION The method iterates through all MIN functions and updates the result value of each function by calling Item_sum::reset(), which in turn picks the new result value from this->head->getInsertRecord(), previously updated by next_min(). The updated value is stored in a member variable of each of the Item_sum objects, depending on the value type.

IMPLEMENTATION The update must be done separately for MIN and MAX, immediately after next_min() was called and before next_max() is called, because both MIN and MAX take their result value from the same buffer this->head->getInsertRecord() (i.e. this->record).

RETURN None

Definition at line 679 of file quick_group_min_max_select.cc.

Referenced by get_next().

Member Data Documentation

memory::Root drizzled::optimizer::QuickGroupMinMaxSelect::alloc

Memory pool for this and quick_prefix_select data.

Definition at line 99 of file quick_group_min_max_select.h.

Referenced by init().

Cursor* drizzled::optimizer::QuickGroupMinMaxSelect::cursor
private

The Cursor used to get data.

Definition at line 69 of file quick_group_min_max_select.h.

Referenced by get_next(), next_max(), next_max_in_range(), next_min(), next_min_in_range(), next_prefix(), and reset().

uint32_t drizzled::optimizer::QuickGroupMinMaxSelect::group_key_parts
private

A number of keyparts in the group prefix

Definition at line 76 of file quick_group_min_max_select.h.

Referenced by next_prefix().

unsigned char* drizzled::optimizer::QuickGroupMinMaxSelect::group_prefix
private

Key prefix consisting of the GROUP fields.

Definition at line 74 of file quick_group_min_max_select.h.

Referenced by get_next(), init(), next_max(), next_max_in_range(), next_min(), next_min_in_range(), and next_prefix().

uint32_t drizzled::optimizer::QuickGroupMinMaxSelect::group_prefix_len
private

Length of the group prefix.

Definition at line 75 of file quick_group_min_max_select.h.

Referenced by get_next(), init(), next_prefix(), and reset().

bool drizzled::optimizer::QuickGroupMinMaxSelect::have_max
private

a MIN, a MAX, or both.

Definition at line 79 of file quick_group_min_max_select.h.

Referenced by get_next(), init(), and update_key_stat().

bool drizzled::optimizer::QuickGroupMinMaxSelect::have_min
private

Specify whether we are computing

Definition at line 78 of file quick_group_min_max_select.h.

Referenced by get_next(), init(), and update_key_stat().

KeyInfo* drizzled::optimizer::QuickGroupMinMaxSelect::index_info
private

The index chosen for data access

Definition at line 71 of file quick_group_min_max_select.h.

Referenced by add_keys_and_lengths(), get_next(), next_max_in_range(), next_min(), next_min_in_range(), next_prefix(), and reset().

Join* drizzled::optimizer::QuickGroupMinMaxSelect::join
private

Descriptor of the current query

Definition at line 70 of file quick_group_min_max_select.h.

Referenced by get_next(), and init().

unsigned char* drizzled::optimizer::QuickGroupMinMaxSelect::key_infix
private

Infix of constants from equality predicates.

Definition at line 83 of file quick_group_min_max_select.h.

Referenced by init(), and next_prefix().

unsigned char* drizzled::optimizer::QuickGroupMinMaxSelect::last_prefix
private

Prefix of the last group for detecting EOF.

Definition at line 77 of file quick_group_min_max_select.h.

Referenced by get_next(), init(), and reset().

unsigned char* drizzled::optimizer::QuickSelectInterface::last_rowid
inherited

The rowid of last row retrieved by this quick select. This is used only when doing ROR-index_merge selects

Definition at line 124 of file range.h.

Referenced by drizzled::optimizer::QuickRorUnionSelect::get_next().

uint32_t drizzled::optimizer::QuickSelectInterface::max_used_key_length
inherited

Total length of first used_key_parts parts of the key. Applicable if index!= MAX_KEY.

Definition at line 111 of file range.h.

Referenced by drizzled::optimizer::QuickRorIntersectSelect::add_keys_and_lengths(), drizzled::optimizer::QuickIndexMergeSelect::add_keys_and_lengths(), add_keys_and_lengths(), adjust_prefix_ranges(), and update_key_stat().

uint32_t drizzled::optimizer::QuickGroupMinMaxSelect::min_max_arg_len
private

The keypart of the only argument field of all MIN/MAX functions. The length of the MIN/MAX argument field

Definition at line 82 of file quick_group_min_max_select.h.

Referenced by add_range(), init(), next_max_in_range(), next_min_in_range(), and update_key_stat().

std::vector<QuickRange *> drizzled::optimizer::QuickGroupMinMaxSelect::min_max_ranges
private

Array of range ptrs for the MIN/MAX field.

Definition at line 85 of file quick_group_min_max_select.h.

Referenced by add_range(), next_max(), next_max_in_range(), next_min(), next_min_in_range(), and update_key_stat().

QuickRangeSelect* drizzled::optimizer::QuickGroupMinMaxSelect::quick_prefix_select

For retrieval of group prefixes.

Definition at line 100 of file quick_group_min_max_select.h.

Referenced by adjust_prefix_ranges(), next_prefix(), and reset().

double drizzled::optimizer::QuickSelectInterface::read_time
inherited

time to perform this retrieval

Definition at line 100 of file range.h.

Referenced by drizzled::best_access_path(), and drizzled::make_join_statistics().

uint32_t drizzled::optimizer::QuickGroupMinMaxSelect::real_key_parts
private

A number of keyparts in the above value.

Definition at line 87 of file quick_group_min_max_select.h.

Referenced by get_next(), next_max(), next_max_in_range(), next_min(), and next_min_in_range().

uint32_t drizzled::optimizer::QuickGroupMinMaxSelect::real_prefix_len
private

Length of key prefix extended with key_infix.

Definition at line 86 of file quick_group_min_max_select.h.

Referenced by init(), next_max_in_range(), next_min(), next_min_in_range(), and update_key_stat().

unsigned char* drizzled::optimizer::QuickGroupMinMaxSelect::record
private

Buffer where the next record is returned.

Definition at line 72 of file quick_group_min_max_select.h.

Referenced by get_next(), next_max(), next_max_in_range(), next_min(), next_min_in_range(), next_prefix(), and reset().

ha_rows drizzled::optimizer::QuickSelectInterface::records
inherited

estimate of # of records to be retrieved

Definition at line 99 of file range.h.

Referenced by drizzled::FileSort::run().

bool drizzled::optimizer::QuickGroupMinMaxSelect::seen_first_key
private

Denotes whether the first key was retrieved.

Definition at line 80 of file quick_group_min_max_select.h.

Referenced by next_prefix().

unsigned char* drizzled::optimizer::QuickGroupMinMaxSelect::tmp_record
private

Temporary storage for next_min(), next_max().

Definition at line 73 of file quick_group_min_max_select.h.

Referenced by next_min(), and next_min_in_range().

uint32_t drizzled::optimizer::QuickSelectInterface::used_key_parts
inherited

Maximum number of (first) key parts this quick select uses for retrieval. eg. for "(key1p1=c1 AND key1p2=c2) OR key1p1=c2" used_key_parts == 2. Applicable if index!= MAX_KEY.

For QUICK_GROUP_MIN_MAX_SELECT it includes MIN/MAX argument keyparts.

Definition at line 119 of file range.h.

Referenced by drizzled::test_if_skip_sort_order(), and update_key_stat().


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