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

  • 相关阅读:
    shell编程——循环执行
    ubuntu 设置管理 集锦
    27. 计算FPS
    29 GameProject4(+GUI)
    26. D3D显示文本
    30. D3D特效
    28. GUI
    32. 细节映射
    25. GameProject3
    Direct3D渲染到纹理 (部分转)
  • 原文地址:https://www.cnblogs.com/gaojian/p/3094769.html
Copyright © 2011-2022 走看看