simpledb.opt
Class HeuristicQueryPlanner
java.lang.Object
simpledb.opt.HeuristicQueryPlanner
- All Implemented Interfaces:
- QueryPlanner
public class HeuristicQueryPlanner
- extends Object
- implements QueryPlanner
A query planner that optimizes using a heuristic-based algorithm.
- Author:
- Edward Sciore
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HeuristicQueryPlanner
public HeuristicQueryPlanner()
createPlan
public Plan createPlan(QueryData data,
Transaction tx)
- Creates an optimized left-deep query plan using the following
heuristics.
H1. Choose the smallest table (considering selection predicates)
to be first in the join order.
H2. Add the table to the join order which
results in the smallest output.
- Specified by:
createPlan
in interface QueryPlanner
- Parameters:
data
- the parsed representation of the querytx
- the calling transaction
- Returns:
- a plan for that query
Copyright © 2011. All Rights Reserved.