博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PostgreSQL在何处处理 sql查询之十一
阅读量:7078 次
发布时间:2019-06-28

本文共 1611 字,大约阅读时间需要 5 分钟。

接前面,继续进行分析:

前面已经说过,在planner函数运行时,发生了实际物理磁盘访问。

/***************************************************************************** * *       Query optimizer entry point * * To support loadable plugins that monitor or modify planner behavior, * we provide a hook variable that lets a plugin get control before and * after the standard planning process.  The plugin would normally call * standard_planner(). * * Note to plugin authors: standard_planner() scribbles on its Query input, * so you'd better copy that data structure if you want to plan more than once. * *****************************************************************************/PlannedStmt *planner(Query *parse, int cursorOptions, ParamListInfo boundParams){    PlannedStmt *result;    if (planner_hook)        result = (*planner_hook) (parse, cursorOptions, boundParams);    else        result = standard_planner(parse, cursorOptions, boundParams);    return result;}PlannedStmt *standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams){    .../* primary planning entry point (may recurse for subqueries) */    top_plan = subquery_planner(glob, parse, NULL,                                false, tuple_fraction, &root);    ...    top_plan = set_plan_references(root, top_plan);    ...    forboth(lp, glob->subplans, lr, glob->subroots)    {        Plan       *subplan = (Plan *) lfirst(lp);        PlannerInfo *subroot = (PlannerInfo *) lfirst(lr);        lfirst(lp) = set_plan_references(subroot, subplan);    }/* build the PlannedStmt result */    result = makeNode(PlannedStmt);    ...    return result;}

接着,要分析 subquery_planner

转载地址:http://lidml.baihongyu.com/

你可能感兴趣的文章
我的友情链接
查看>>
仿PHP的Base64编码(支持中文、兼容PHP)
查看>>
虚拟机linux的ip和dns设置
查看>>
网络行为审计技术深度解析
查看>>
集成支付宝钱包支付iOS SDK的方法与经验
查看>>
8月9日vim作业
查看>>
腾讯微博android授权 SharedPreferences用法
查看>>
图文详解YUV420数据格式
查看>>
nginx 【logformat】日志格式
查看>>
【Linux系列】【基础版】第四章 Shell基础之正则表达式
查看>>
JWT 在 Spring 上的实践
查看>>
释放linux缓存
查看>>
4、C语言 —— 基本运算
查看>>
js判断是否是ipad还是iphone及各手机用户
查看>>
同时添加多个github ssh key的方法
查看>>
Essential Grid for ASP.NET MVC
查看>>
PDA使用异常指导手册
查看>>
goroutine背后的系统知识
查看>>
ubuntu安装nrpe无法安装问题
查看>>
命令操作
查看>>