com.sleepycat.je.tree
Class CountEstimator
java.lang.Object
com.sleepycat.je.tree.CountEstimator
public class CountEstimator
- extends Object
Estimates the number of non-deleted BIN entries between two end points,
using information returned in TrackingInfo from Tree.getParentINForChildIN.
Used for estimating dup counts, e.g., for join query optimization. Accuracy
is limited by the number of samples taken to compute the average number of
entries at each level. Currently only two samples (at the end points) are
taken, and because the tree is not balanced making the number of entries
highly variable, the count can easily be off by a factor of two.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
count
public static long count(DatabaseImpl dbImpl,
CursorImpl beginCursor,
boolean beginInclusive,
CursorImpl endCursor,
boolean endInclusive)
- Returns an estimate of the number of records between two end points
specified by begin/end cursor positions.
getKeyRatios
static CountEstimator.KeyRatios getKeyRatios(List<TrackingInfo> infoByLevel,
boolean exact)
Copyright (c) 2004-2012 Oracle. All rights reserved.