本文整理汇总了Java中org.voltdb.planner.PlanStatistics类的典型用法代码示例。如果您正苦于以下问题:Java PlanStatistics类的具体用法?Java PlanStatistics怎么用?Java PlanStatistics使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlanStatistics类属于org.voltdb.planner包,在下文中一共展示了PlanStatistics类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeEstimatesRecursively
import org.voltdb.planner.PlanStatistics; //导入依赖的package包/类
public boolean computeEstimatesRecursively(PlanStatistics stats, Cluster cluster, Database db, DatabaseEstimates estimates, ScalarValueHints[] paramHints) {
assert(estimates != null);
m_outputColumnHints.clear();
m_estimatedOutputTupleCount = 0;
// recursively compute and collect stats from children
for (AbstractPlanNode child : m_children) {
boolean result = child.computeEstimatesRecursively(stats, cluster, db, estimates, paramHints);
assert(result);
m_outputColumnHints.addAll(child.m_outputColumnHints);
m_estimatedOutputTupleCount += child.m_estimatedOutputTupleCount;
stats.incrementStatistic(0, StatsField.TUPLES_READ, m_estimatedOutputTupleCount);
}
return true;
}
示例2: computeEstimatesRecursively
import org.voltdb.planner.PlanStatistics; //导入依赖的package包/类
@Override
public boolean computeEstimatesRecursively(PlanStatistics stats, Cluster cluster, Database db, DatabaseEstimates estimates, ScalarValueHints[] paramHints) {
Table target = db.getTables().getIgnoreCase(m_targetTableName);
assert(target != null);
DatabaseEstimates.TableEstimates tableEstimates = estimates.getEstimatesForTable(target.getTypeName());
stats.incrementStatistic(0, StatsField.TREE_INDEX_LEVELS_TRAVERSED, (long)(Math.log(tableEstimates.maxTuples)));
stats.incrementStatistic(0, StatsField.TUPLES_READ, 1);
m_estimatedOutputTupleCount = 1;
return true;
}
示例3: computeEstimatesRecursively
import org.voltdb.planner.PlanStatistics; //导入依赖的package包/类
@Override
public boolean computeEstimatesRecursively(PlanStatistics stats, Cluster cluster, Database db, DatabaseEstimates estimates, ScalarValueHints[] paramHints) {
Table target = db.getTables().getIgnoreCase(m_targetTableName);
assert(target != null);
DatabaseEstimates.TableEstimates tableEstimates = estimates.getEstimatesForTable(target.getTypeName());
stats.incrementStatistic(0, StatsField.TUPLES_READ, tableEstimates.maxTuples);
m_estimatedOutputTupleCount = tableEstimates.maxTuples;
return true;
}
示例4: computeEstimatesRecursively
import org.voltdb.planner.PlanStatistics; //导入依赖的package包/类
/**
* Called to compute cost estimates and statistics on a plan graph. Computing of the costs
* should be idempotent, but updating the PlanStatistics instance isn't, so this should
* be called once per finished graph, and once per PlanStatistics instance.
* TODO(XIN): It takes at least 14% planner CPU. Optimize it.
*/
public final void computeEstimatesRecursively(PlanStatistics stats,
Cluster cluster,
Database db,
DatabaseEstimates estimates,
ScalarValueHints[] paramHints)
{
assert(stats != null);
m_outputColumnHints.clear();
m_estimatedOutputTupleCount = 0;
// recursively compute and collect stats from children
long childOutputTupleCountEstimate = 0;
for (AbstractPlanNode child : m_children) {
child.computeEstimatesRecursively(stats, cluster, db, estimates, paramHints);
m_outputColumnHints.addAll(child.m_outputColumnHints);
childOutputTupleCountEstimate += child.m_estimatedOutputTupleCount;
}
// make sure any inlined scans (for NLIJ mostly) are costed as well
for (Entry<PlanNodeType, AbstractPlanNode> entry : m_inlineNodes.entrySet()) {
AbstractPlanNode inlineNode = entry.getValue();
if (inlineNode instanceof AbstractScanPlanNode) {
inlineNode.computeCostEstimates(0, cluster, db, estimates, paramHints);
}
}
computeCostEstimates(childOutputTupleCountEstimate, cluster, db, estimates, paramHints);
stats.incrementStatistic(0, StatsField.TUPLES_READ, m_estimatedProcessedTupleCount);
}
示例5: computeEstimatesRecursively
import org.voltdb.planner.PlanStatistics; //导入依赖的package包/类
@Override
public boolean computeEstimatesRecursively(PlanStatistics stats,
Cluster cluster, Database db, DatabaseEstimates estimates, ScalarValueHints[] paramHints) {
// TODO Auto-generated method stub
return super.computeEstimatesRecursively(stats, cluster, db, estimates, paramHints);
}