On Thu, Jan 10, 2019 at 11:41:51PM -0800, Donald Dong wrote:
>
> > On Jan 10, 2019, at 8:01 PM, Tom Lane 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
> On Jan 10, 2019, at 8:01 PM, Tom Lane 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
Donald Dong writes:
> I created some empty tables and run ` EXPLAIN ANALYZE` on `SELECT * `. I found
> the results have different row numbers, but the tables are all empty.
This isn't a terribly interesting case, since you've neither loaded
any data nor vacuumed/analyzed the table, but ...
> I
Thank you for the great explanation!
> On Jan 10, 2019, at 7:48 PM, Andrew Gierth
> wrote:
>
>> "Donald" == Donald Dong writes:
>
> Donald> Hi,
> Donald> I created some empty tables and run ` EXPLAIN ANALYZE` on
> Donald> `SELECT * `. I found the results have different row numbers,
>
> "Donald" == Donald Dong writes:
Donald> Hi,
Donald> I created some empty tables and run ` EXPLAIN ANALYZE` on
Donald> `SELECT * `. I found the results have different row numbers,
Donald> but the tables are all empty.
Empty tables are something of a special case, because the planner