zoukankan      html  css  js  c++  java
  • PostgreSQL在何处处理 sql查询之六十六

    继续分析

    /*
     * final_cost_hashjoin
     *      Final estimate of the cost and result size of a hashjoin path.
     *
     * Note: the numbatches estimate is also saved into 'path' for use later
     *
     * 'path' is already filled in except for the rows and cost fields and
     *        num_batches
     * 'workspace' is the result from initial_cost_hashjoin
     * 'sjinfo' is extra info about the join for selectivity estimation
     * 'semifactors' contains valid data if path->jointype is SEMI or ANTI
     */
    void
    final_cost_hashjoin(PlannerInfo *root, HashPath *path,
                        JoinCostWorkspace *workspace,
                        SpecialJoinInfo *sjinfo,
                        SemiAntiJoinFactors *semifactors)
    {
        Path       *outer_path = path->jpath.outerjoinpath;
        Path       *inner_path = path->jpath.innerjoinpath;
        double        outer_path_rows = outer_path->rows;
        double        inner_path_rows = inner_path->rows;
        List       *hashclauses = path->path_hashclauses;
        Cost        startup_cost = workspace->startup_cost;
        Cost        run_cost = workspace->run_cost;
        int            numbuckets = workspace->numbuckets;
        int            numbatches = workspace->numbatches;
        Cost        cpu_per_tuple;
        QualCost    hash_qual_cost;
        QualCost    qp_qual_cost;
        double        hashjointuples;
        double        virtualbuckets;
        Selectivity innerbucketsize;
        ListCell   *hcl;

    ...
    qp_qual_cost.startup -= hash_qual_cost.startup;
    qp_qual_cost.per_tuple -= hash_qual_cost.per_tuple;
    ...
    }
  • 相关阅读:
    【引用】Android.mk简介
    android02android的四大组件
    rpm 安装指令全
    android04activity的布局管理器
    代码积累1统计图
    清除防火墙所有配置规则
    代码积累2tab页面滑动效果
    RHEL5 配置YUM源 安装RZSZ
    系统安全漏洞扫描软件
    liunx下防火墙的配置
  • 原文地址:https://www.cnblogs.com/gaojian/p/3134431.html
Copyright © 2011-2022 走看看