Class QueryOptimizer.IndexSelection
java.lang.Object
com.loomcache.server.query.QueryOptimizer.IndexSelection
- All Implemented Interfaces:
QueryOptimizer.OptimizationRule
- Enclosing class:
QueryOptimizer
public static final class QueryOptimizer.IndexSelection
extends Object
implements QueryOptimizer.OptimizationRule
Index selection optimization: chooses the best index for WHERE clause predicates.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
IndexSelection
public IndexSelection()
-
-
Method Details
-
name
Description copied from interface:QueryOptimizer.OptimizationRuleGets the name of this optimization rule.- Specified by:
namein interfaceQueryOptimizer.OptimizationRule
-
apply
public QueryPlan apply(QueryPlan plan, @Nullable QueryOptimizer.TableStatistics stats, Map<String, MapIndex<?, ?>> availableIndexes) Description copied from interface:QueryOptimizer.OptimizationRuleApplies this optimization rule to the given query plan.- Specified by:
applyin interfaceQueryOptimizer.OptimizationRule- Parameters:
plan- the original query planstats- table statistics (if available)availableIndexes- available indexes for the table- Returns:
- optimized query plan, or original if optimization cannot be applied
-