PostgreSQL在何处处理 sql查询之六十二
对
RelOptInfo *
make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2) 函数进行研究:
看看 inner join 时候发生的事情:
RelOptInfo * make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2) {...SpecialJoinInfo *sjinfo;.../* Check validity and determine join type. */if (!join_is_legal(root, rel1, rel2, joinrelids,&sjinfo, &reversed)).../** If it's a plain inner join, then we won't have found anything in* join_info_list. Make up a SpecialJoinInfo so that selectivity* estimation functions will know what's being joined.*/if (sjinfo == NULL){ sjinfo = &sjinfo_data;sjinfo->type = T_SpecialJoinInfo;sjinfo->min_lefthand = rel1->relids;sjinfo->min_righthand = rel2->relids;sjinfo->syn_lefthand = rel1->relids;sjinfo->syn_righthand = rel2->relids;sjinfo->jointype = JOIN_INNER;/* we don't bother trying to make the remaining fields valid */sjinfo->lhs_strict = false;sjinfo->delay_upper_joins = false;sjinfo->join_quals = NIL;}...switch (sjinfo->jointype){case JOIN_INNER:fprintf(stderr,"JOIN_INNER \n");if (is_dummy_rel(rel1) || is_dummy_rel(rel2) ||restriction_is_constant_false(restrictlist, false)){mark_dummy_rel(joinrel);break;}add_paths_to_joinrel(root, joinrel, rel1, rel2,JOIN_INNER, sjinfo,restrictlist);add_paths_to_joinrel(root, joinrel, rel2, rel1,JOIN_INNER, sjinfo,restrictlist);break;...}... }
转载于:https://www.cnblogs.com/gaojian/archive/2013/06/13/3133872.html
PostgreSQL在何处处理 sql查询之六十二相关推荐
- PostgreSQL在何处处理 sql查询之六十六
继续分析 /** final_cost_hashjoin* Final estimate of the cost and result size of a hashjoin path.** Note: ...
- PostgreSQL在何处处理 sql查询之五十二
开始 /** Ready to do the primary planning.*/final_rel = make_one_rel(root, joinlist); 展开: /** make_one ...
- PostgreSQL在何处处理 sql查询之十二
接前面,对 subquery_planner,进行进一步的分析: /*--------------------* subquery_planner* Invokes the planner on a ...
- PostgreSQL在何处处理 sql查询之五十四
接前面,从 cheapeast_path 的角度,关注 query_planner 函数,对其进行简化: void query_planner(PlannerInfo *root, List *tli ...
- PostgreSQL在何处处理 sql查询之四十六
接前面,再上溯:set_base_rel_pathlists --> set_rel_pathlist /** set_base_rel_pathlists* Finds all paths a ...
- PostgreSQL在何处处理 sql查询之三十九
接前面,这次重点分析 ExecScan: 其for 循环内部: for (;;){ TupleTableSlot *slot;CHECK_FOR_INTERRUPTS(); slot = ExecSc ...
- PostgreSQL在何处处理 sql查询之三十八
这里又遇到了函数指针: executor.h头文件中,定义了 ExecScanAccessMtd 指针,或者定义了一个ExecScanAccessMtd 函数原型的指针 /** prototypes ...
- PostgreSQL在何处处理 sql查询之六
前面说过 PortalStart明确执行策略后,要执行 ExecutorStart. 那么ExecutorStart 到底作了什么呢.以下是缩略: /* ----------------------- ...
- SAP UI5 应用开发教程之六十二 - 基于 OData V4 的 SAP UI5 表格控件使用方法介绍试读版
一套适合 SAP UI5 初学者循序渐进的学习教程 教程目录 SAP UI5 本地开发环境的搭建 SAP UI5 应用开发教程之一:Hello World SAP UI5 应用开发教程之二:SAP U ...
最新文章
- 使用OpenRowSet操作Excel Excel导入数据库
- Rust 数据类型介绍
- [转]MySQL实现分页查询
- CLR via C# 读书笔记 1-2 创建线程的成本
- java基础(十) 深入理解数组类型
- kinect 录制彩色和深度视频
- python gui编程框架_工程师必知的几个Python GUI框架
- Activity、BroadcastReceiver、Service共同工作的简单例子
- python 结尾回车_理解不了Python正则表达式?我帮你搞定
- php 5.6 文档,文件存储 | 进阶系列 | Laravel 5.6 中文文档
- microsoft query sql引用单元格_Microsoft.Office.Interop.Excel操作Excel拾遗
- Linux 查找进程与结束进程
- Linux netstat 命令详解
- python基础:os模块
- 佳能Canon imageCLASS MF227dw 打印机驱动
- 卷积神经网络通俗易懂理解
- 什么牌子真无线蓝牙耳机适合运动,高续航舒适小巧这五款蓝牙耳机不要错过
- OMV搭建系列教程[5] – 安装Aria2
- 无理数的无理数次幂的结果可以是有理数?(以〖√2〗^√2为例)
- RuntimeError: Sizes of tensors must match except in dimension 1. Got 61 and 60 in dimension 2