MySQL 9.1.0
Source Code Documentation
|
This class caches table_paths for materialized tables. More...
Classes | |
struct | RefPath |
Public Member Functions | |
MaterializedPathCache (THD *thd) | |
MaterializedPathCache (const MaterializedPathCache &)=delete | |
MaterializedPathCache & | operator= (const MaterializedPathCache &)=delete |
AccessPath * | LookupPath (const AccessPath *table_path) const |
Look for a cached MATERIALIZE path matching 'table_path', i.e. More... | |
void | PutPath (AccessPath *materialize_path, const AccessPath *table_path) |
Add 'materialize_path' to the cache. More... | |
Private Attributes | |
Mem_root_array< RefPath > | m_ref_paths |
MATERIALIZE paths for REF access. More... | |
AccessPath * | m_table_scan {nullptr} |
MATERIALIZE path for TABLE_SCAN access. More... | |
This class caches table_paths for materialized tables.
This is useful if we need to plan the query block twice (the hypergraph optimizer can do so, with and without in2exists predicates), both saving work and avoiding issues when we try to throw away the old items_to_copy for a new (identical) one.
|
inlineexplicit |
|
delete |
AccessPath * MaterializedPathCache::LookupPath | ( | const AccessPath * | table_path | ) | const |
Look for a cached MATERIALIZE path matching 'table_path', i.e.
one where the table_path has the same type as 'table_path', and use the same key prefix if it is a REF.
|
delete |
void MaterializedPathCache::PutPath | ( | AccessPath * | materialize_path, |
const AccessPath * | table_path | ||
) |
Add 'materialize_path' to the cache.
Use the type (and possible key prefix) of 'table_path' as a key for retrieving it later.
|
private |
MATERIALIZE paths for REF access.
|
private |
MATERIALIZE path for TABLE_SCAN access.