#include <key.h>
◆ has_records_per_key()
bool KEY::has_records_per_key |
( |
uint |
key_part_no | ) |
const |
|
inline |
Check if records per key estimate is available for given key part.
- Parameters
-
key_part_no | key part number, must be in [0, KEY::actual_key_parts) |
- Returns
- true if records per key estimate is available, false otherwise
◆ in_memory_estimate()
double KEY::in_memory_estimate |
( |
| ) |
const |
|
inline |
Retrieve the estimate for how much of the index data that is available in a memory buffer.
The returned estimate will be in the interval [0..1].
- Returns
- Estimate for how much of index data is available in memory buffer
- Return values
-
IN_MEMORY_ESTIMATE_UNKNOWN | no estimate available |
!= | IN_MEMORY_ESTIMATE_UNKNOWN estimate |
◆ is_functional_index()
bool KEY::is_functional_index |
( |
| ) |
const |
- Return values
-
true | if this is a functional index (at least one of the key parts is a functional key part). |
false | if this isn't a functional index. |
◆ move_rec_per_key()
void KEY::move_rec_per_key |
( |
ulong * |
rec_per_key_arg, |
|
|
rec_per_key_t * |
rec_per_key_float_arg |
|
) |
| |
|
inline |
Move rec_per_key arrays from old to new position.
Ignore if arrays have not been set up yet.
- Parameters
-
rec_per_key_arg | pointer to adjusted rec per key array |
rec_per_key_float_arg | pointer to adjusted rec per key array (float) |
◆ records_per_key()
Retrieve an estimate for the average number of records per distinct value, when looking only at the first key_part_no+1 columns.
If no record per key estimate is available for this key part, REC_PER_KEY_UNKNOWN is returned.
- Parameters
-
key_part_no | key part number, must be in [0, KEY::actual_key_parts) |
- Returns
- Number of records having the same key value
- Return values
-
REC_PER_KEY_UNKNOWN | no records per key estimate available |
!= | REC_PER_KEY_UNKNOWN record per key estimate |
◆ set_in_memory_estimate()
void KEY::set_in_memory_estimate |
( |
double |
in_memory_estimate | ) |
|
|
inline |
Set the estimate for how much of this index that is currently in a memory buffer.
The estimate must be in the interval [0..1] or take the value IN_MEMORY_ESTIMATE_UNKNOWN.
◆ set_rec_per_key_array()
void KEY::set_rec_per_key_array |
( |
ulong * |
rec_per_key_arg, |
|
|
rec_per_key_t * |
rec_per_key_float_arg |
|
) |
| |
|
inline |
Assign storage for the rec per key arrays to the KEY object.
This is used when allocating memory and creating KEY objects. The caller is responsible for allocating the correct size for the two arrays. If needed, the caller is also responsible for de-allocating the memory when the KEY object is no longer used.
- Parameters
-
rec_per_key_arg | pointer to allocated array for storing records per key using ulong |
rec_per_key_float_arg | pointer to allocated array for storing records per key using float |
◆ set_records_per_key()
void KEY::set_records_per_key |
( |
uint |
key_part_no, |
|
|
rec_per_key_t |
rec_per_key_est |
|
) |
| |
|
inline |
Set the records per key estimate for a key part.
The records per key estimate must be in [1.0,..> or take the value REC_PER_KEY_UNKNOWN.
- Parameters
-
key_part_no | the number of key parts that the estimate includes, must be in [0, KEY::actual_key_parts) |
rec_per_key_est | new records per key estimate |
◆ supports_records_per_key()
bool KEY::supports_records_per_key |
( |
| ) |
const |
|
inline |
Check if this key supports storing records per key information.
- Returns
- true if it has support for storing records per key information, false otherwise.
◆ actual_flags
ulong KEY::actual_flags {0} |
dupp key and pack flags for actual key parts
◆ actual_key_parts
uint KEY::actual_key_parts {0} |
How many key_parts including hidden parts.
◆ block_size
◆ comment
◆ engine_attribute
◆ flags
◆ is_algorithm_explicit
bool KEY::is_algorithm_explicit {false} |
A flag which indicates that index algorithm for this key was explicitly specified by user.
So, for example, it should be mentioned in SHOW CREATE TABLE output.
◆ is_visible
bool KEY::is_visible {false} |
True if this index is visible to the query optimizer.
The optimizer may only use visible indexes.
◆ key_length
◆ key_part
◆ m_in_memory_estimate
double KEY::m_in_memory_estimate {0.0} |
|
private |
Estimate for how much of the index data that is currently available in a memory buffer.
Valid range is [0..1]. This will be initialized to a IN_MEMORY_ESTIMATE_UNKNOWN. If it still has this value when used, it means that the storage engine has not supplied a value.
◆ name
◆ parser
Note that parser is used when the table is opened for use, and parser_name is used when the table is being created.
Fulltext [pre]parser
◆ parser_name
Fulltext [pre]parser name.
◆ rec_per_key
Array of AVG(number of records with the same field value) for 1st ... Nth key part.
0 means 'not known'. For internally created temporary tables, this member can be nullptr.
◆ rec_per_key_float
Array of AVG(number of records with the same field value) for 1st ... Nth key part.
For internally created temporary tables, this member can be nullptr. This is the same information as stored in the above rec_per_key array but using float values instead of integer values. If the storage engine has supplied values in this array, these will be used. Otherwise the value in rec_per_key will be used.
◆ secondary_engine_attribute
◆ table
◆ unused_key_parts
uint KEY::unused_key_parts {0} |
Key parts allocated for primary key parts extension but not used due to some reasons(no primary key, duplicated key parts)
◆ usable_key_parts
uint KEY::usable_key_parts {0} |
Should normally be = actual_key_parts.
◆ user_defined_key_parts
uint KEY::user_defined_key_parts {0} |
The documentation for this class was generated from the following files: