当前位置: 首页>>代码示例>>Java>>正文


Java PlanStatistics类代码示例

本文整理汇总了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;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:19,代码来源:AbstractPlanNode.java

示例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;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:11,代码来源:IndexScanPlanNode.java

示例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;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:10,代码来源:SeqScanPlanNode.java

示例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);
}
 
开发者ID:anhnv-3991,项目名称:VoltDB,代码行数:37,代码来源:AbstractPlanNode.java

示例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);
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:7,代码来源:ProjectionPlanNode.java


注:本文中的org.voltdb.planner.PlanStatistics类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。