欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

PostgreSQL代碼分析,查詢優(yōu)化部分,pull_ands(

系統(tǒng) 2477 0

PostgreSQL代碼分析,查詢優(yōu)化部分。


這里把規(guī)范謂詞表達(dá)式的部分就整理完了,閱讀的順序例如以下:

一、PostgreSQL代碼分析,查詢優(yōu)化部分,canonicalize_qual

二、PostgreSQL代碼分析,查詢優(yōu)化部分,pull_ands()和pull_ors()

三、 PostgreSQL代碼分析,查詢優(yōu)化部分,process_duplicate_ors


*************************************************************************************************************************************************************


pull_ands()和pull_ors()的代碼比較便于理解,就是把樹(shù)狀結(jié)構(gòu)的AND操作拉平,下圖是pull_ands的樣例,pull_ors邏輯同樣:


PostgreSQL代碼分析,查詢優(yōu)化部分,pull_ands()和pull_ors()


      /*
 * pull_ands
 *	  Recursively flatten nested AND clauses into a single and-clause list.
 *
 * Input is the arglist of an AND clause.
 * Returns the rebuilt arglist (note original list structure is not touched).
 */
static List *
pull_ands(List *andlist)
{
	List	   *out_list = NIL;
	ListCell   *arg;

	foreach(arg, andlist)
	{
		Node	   *subexpr = (Node *) lfirst(arg);

		/*
		 * Note: we can destructively concat the subexpression's arglist
		 * because we know the recursive invocation of pull_ands will have
		 * built a new arglist not shared with any other expr. Otherwise we'd
		 * need a list_copy here.
		 */
		if (and_clause(subexpr))
			out_list = list_concat(out_list,
								   pull_ands(((BoolExpr *) subexpr)->args));
		else
			out_list = lappend(out_list, subexpr);
	}
	return out_list;
}

/*
 * pull_ors
 *	  Recursively flatten nested OR clauses into a single or-clause list.
 *
 * Input is the arglist of an OR clause.
 * Returns the rebuilt arglist (note original list structure is not touched).
 */
static List *
pull_ors(List *orlist)
{
	List	   *out_list = NIL;
	ListCell   *arg;

	foreach(arg, orlist)
	{
		Node	   *subexpr = (Node *) lfirst(arg);

		/*
		 * Note: we can destructively concat the subexpression's arglist
		 * because we know the recursive invocation of pull_ors will have
		 * built a new arglist not shared with any other expr. Otherwise we'd
		 * need a list_copy here.
		 */
		if (or_clause(subexpr))
			out_list = list_concat(out_list,
								   pull_ors(((BoolExpr *) subexpr)->args));
		else
			out_list = lappend(out_list, subexpr);
	}
	return out_list;
}
    

張大明確的blog:http://blog.csdn.net/shujiezhang


PostgreSQL代碼分析,查詢優(yōu)化部分,pull_ands()和pull_ors()


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 国产激情| 欧美乱xxxxx强 | 日本一级在线 | 一区二区三区网站在线免费线观看 | 麻豆AV蜜桃AV久久 | 色狠狠狠色噜噜噜综合网 | 国产色| 欧美一级电影在线播放 | 欧美日韩在线观看视频 | 免费看在线偷拍视频 | 久久伊人免费视频 | 免费午夜不卡毛片 | 国产日韩欧美在线 | 91在线看| 成人性生交A片免费看麻豆 色倩网站 | 黄视频网站 | 精品国产黄a∨片高清在线 亚洲3atv精品一区二区三区 | 91视频在线 | 日韩高清一区 | 夜色成人网 | 国产免费福利网站 | 成人一区二区在线观看视频 | 草久久久 | 女人被男人狂躁下面在线观看 | 日韩中文字幕在线播放 | 五月婷亚洲 | 中文字幕亚洲一区二区三区 | 亚洲精品第一页 | 日韩在线免费视频观看 | 久久久成人精品视频 | 不卡一区| 精品综合在线 | 国产欧美日韩在线 | 久久y| 久操色| 国产成人羞羞视频在线 | 日本久草视频 | 国内精品伊人久久久影视 | 抱着cao才爽免费观看 | 加勒比久草 | 狠狠操电影|