In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
< root->Simple_rel_array_size; rti++) / / calculate the total pages {RelOptInfo * brel = root- > simple_rel_ array [RTI]; if (brel = = NULL) continue; Assert (brel- > relid = = rti); / * sanity check on array * / if (IS_SIMPLE_REL (brel)) total_pages + = (double) brel- > pages;} root- > total_table_pages = total_pages / / assign / * * Ready to do the primary planning. * / final_rel = make_one_rel (root, joinlist); / / execute the main planning process / * Check that we got at least one usable path * / if (! final_rel | |! final_rel- > cheapest_total_path | | final_rel- > cheapest_total_path- > param_info! = NULL) elog (ERROR, "failed to construct the join relation"); / / check the result returned by return final_rel;//}
Setup_simple_rel_arrays
Initialize setup_simple_rel_arrays (Note: [0] useless) and setup_simple_rel_arrays
/ * * setup_simple_rel_arrays * Prepare the arrays we use for quickly accessing base relations. * / void setup_simple_rel_arrays (PlannerInfo * root) {Index rti; ListCell * lc; / * Arrays are accessed using RT indexes (1.. N) * / root- > simple_rel_array_size = list_length (root- > parse- > rtable) + 1; / * simple_rel_array is initialized to all NULLs * / root- > simple_rel_array = (RelOptInfo * *) palloc0 (root- > simple_rel_array_size * sizeof (RelOptInfo *)) / * simple_rte_array is an array equivalent of the rtable list * / root- > simple_rte_array = (RangeTblEntry * *) palloc0 (root- > simple_rel_array_size * sizeof (RangeTblEntry *)); rti = 1; foreach (lc, root- > parse- > rtable) {RangeTblEntry * rte = (RangeTblEntry *) lfirst (lc); root- > simple_rte_ array [RTI + +] = rte;}}
Setup_append_rel_array
The source code is relatively simple. Read the information in append_rel_list to initialize append_rel_array.
/ * * setup_append_rel_array * Populate the append_rel_array to allow direct lookups of * AppendRelInfos by child relid. * * The array remains unallocated if there are no AppendRelInfos. * / void setup_append_rel_array (PlannerInfo * root) {ListCell * lc; int size = list_length (root- > parse- > rtable) + 1; if (root- > append_rel_list = = NIL) {root- > append_rel_array = NULL; return;} root- > append_rel_array = (AppendRelInfo *) palloc0 (size * sizeof (AppendRelInfo *)) Foreach (lc, root- > append_rel_list) {AppendRelInfo * appinfo = lfirst_node (AppendRelInfo, lc); int child_relid = appinfo- > child_relid; / * Sanity check * / Assert (child_relid
< size); if (root->Append_rel_ array [child _ relid]) elog (ERROR, "child relation already exists"); root- > append_rel_ array [child _ relid] = appinfo }} Thank you for your reading, the above is the content of "what is the query_planner function processing logic in PostgreSQL". After the study of this article, I believe you have a deeper understanding of how the query_planner function processing logic in PostgreSQL is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
# = 2. Mongo==# backup database mongodump-h 127.0.0.1-d eb_mongo-o / roo
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.