Re: How does the planner determine plan_rows ?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Donald Dong <xdong(at)csumb(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How does the planner determine plan_rows ?
Date: 2019-01-26 00:01:53
Message-ID: 20190126000153.GK13803@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 10, 2019 at 11:41:51PM -0800, Donald Dong wrote:
>
> > On Jan 10, 2019, at 8:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >
> > ... estimate_rel_size() in plancat.c is where to look to find out
> > about the planner's default estimates when it's lacking hard data.
>
> Thank you! Now I see how the planner uses the rows to estimate the cost and
> generates the best_plan.
>
> To me, tracing the function calls is not a simple task. I'm using cscope, and I
> use printf when I'm not entirely sure. I was considering to use gbd, but I'm
> having issues referencing the source code in gdb.
>
> I'm very interested to learn how the professionals explore the codebase!

Uh, the developer FAQ has some info on this:

https://wiki.postgresql.org/wiki/Developer_FAQ

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-01-26 00:20:55 Re: proposal: new polymorphic types - commontype and commontypearray
Previous Message Bruce Momjian 2019-01-25 23:57:38 Re: Strange wording in advanced tutorial