simpledb.opt
Class HeuristicQueryPlanner

java.lang.Object
  extended by 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

Constructor Summary
HeuristicQueryPlanner()
           
 
Method Summary
 Plan createPlan(QueryData data, Transaction tx)
          Creates an optimized left-deep query plan using the following heuristics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeuristicQueryPlanner

public HeuristicQueryPlanner()
Method Detail

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 query
tx - the calling transaction
Returns:
a plan for that query


Copyright © 2011. All Rights Reserved.