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

    继续:

    /*--------------------
     * grouping_planner
     *      Perform planning steps related to grouping, aggregation, etc.
     *      This primarily means adding top-level processing to the basic
     *      query plan produced by query_planner.
     *
     * tuple_fraction is the fraction of tuples we expect will be retrieved
     *
     * tuple_fraction is interpreted as follows:
     *      0: expect all tuples to be retrieved (normal case)
     *      0 < tuple_fraction < 1: expect the given fraction of tuples available
     *        from the plan to be retrieved
     *      tuple_fraction >= 1: tuple_fraction is the absolute number of tuples
     *        expected to be retrieved (ie, a LIMIT specification)
     *
     * Returns a query plan.  Also, root->query_pathkeys is returned as the
     * actual output ordering of the plan (in pathkey format).
     *--------------------
     */
    static Plan *
    grouping_planner(PlannerInfo *root, double tuple_fraction)
    {
        ...
    
        if (parse->setOperations)
        {
           ...
        }
        else
        {   
    ...
    /* * Generate the best unsorted and presorted paths for this Query (but * note there may not be any presorted path). query_planner will also * estimate the number of groups in the query, and canonicalize all * the pathkeys. */ query_planner(root, sub_tlist, tuple_fraction, sub_limit_tuples, &cheapest_path, &sorted_path, &dNumGroups); ... } /* end of if (setOperations) */ ... return result_plan; }

    此处调用 query_planner

  • 相关阅读:
    04机器学习实战之朴素贝叶斯
    06Web服务
    03机器学习实战之决策树scikit-learn实现
    03机器学习实战之决策树
    将两个列表合并为字典_其中一个列表为Key_一个列表为Value
    17反射
    16网络通信协议
    百练 2733 判断闰年 解题报告
    百练 2799 浮点数格式 解题报告
    lucene详细介绍
  • 原文地址:https://www.cnblogs.com/gaojian/p/3094769.html
Copyright © 2011-2022 走看看