Re: How does the planner determine plan_rows ?

From: Donald Dong <xdong(at)csumb(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How does the planner determine plan_rows ?
Date: 2019-01-11 07:41:51
Message-ID: AB9055A8-3AC2-4885-B1D5-6DC44451A075@csumb.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> 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!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-01-11 08:30:52 Re: [HACKERS] generated columns
Previous Message Michael Paquier 2019-01-11 07:04:41 Re: [Sender Address Forgery]Re: error message when subscription target is a partitioned table