org.apache.directory.server.xdbm.search.impl
Class DefaultOptimizer<E,ID extends Comparable<ID>>
java.lang.Object
org.apache.directory.server.xdbm.search.impl.DefaultOptimizer<E,ID>
- All Implemented Interfaces:
- Optimizer
public class DefaultOptimizer<E,ID extends Comparable<ID>>
- extends Object
- implements Optimizer
Optimizer that annotates the filter using scan counts.
- Author:
- Apache Directory Project
|
Method Summary |
Long |
annotate(org.apache.directory.shared.ldap.model.filter.ExprNode node)
Annotates the expression tree to determine optimal evaluation order based
on the scan count for indices that exist for each expression node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultOptimizer
public DefaultOptimizer(Store<E,ID> db)
throws Exception
- Creates an optimizer on a database.
- Parameters:
db - the database this optimizer works for.
- Throws:
Exception
annotate
public Long annotate(org.apache.directory.shared.ldap.model.filter.ExprNode node)
throws Exception
- Annotates the expression tree to determine optimal evaluation order based
on the scan count for indices that exist for each expression node. If an
index on the attribute does not exist an IndexNotFoundException will be
thrown.
- Specified by:
annotate in interface Optimizer
- Parameters:
node - the root of the expression node tree
- Throws:
Exception - if there are failures while optimizing- See Also:
Optimizer.annotate(ExprNode)
Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.