MySQL 9.1.0
Source Code Documentation
MaterializedPathCache Class Referencefinal

This class caches table_paths for materialized tables. More...

Classes

struct  RefPath
 

Public Member Functions

 MaterializedPathCache (THD *thd)
 
 MaterializedPathCache (const MaterializedPathCache &)=delete
 
MaterializedPathCacheoperator= (const MaterializedPathCache &)=delete
 
AccessPathLookupPath (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< RefPathm_ref_paths
 MATERIALIZE paths for REF access. More...
 
AccessPathm_table_scan {nullptr}
 MATERIALIZE path for TABLE_SCAN access. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MaterializedPathCache() [1/2]

MaterializedPathCache::MaterializedPathCache ( THD thd)
inlineexplicit

◆ MaterializedPathCache() [2/2]

MaterializedPathCache::MaterializedPathCache ( const MaterializedPathCache )
delete

Member Function Documentation

◆ LookupPath()

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.

◆ operator=()

MaterializedPathCache & MaterializedPathCache::operator= ( const MaterializedPathCache )
delete

◆ PutPath()

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.

Member Data Documentation

◆ m_ref_paths

Mem_root_array<RefPath> MaterializedPathCache::m_ref_paths
private

MATERIALIZE paths for REF access.

◆ m_table_scan

AccessPath* MaterializedPathCache::m_table_scan {nullptr}
private

MATERIALIZE path for TABLE_SCAN access.


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