Re: Different row estimations on base rels - Mailing list pgsql-hackers

From Donald Dong
Subject Re: Different row estimations on base rels
Date
Msg-id 3A202828-0FEF-4A27-994D-364B15B692F0@csumb.edu
Whole thread Raw
In response to Re: Different row estimations on base rels  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On May 29, 2019, at 1:36 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> Well, it's all there in the code.  I believe the issue is that the
> final estimates are based on the number of rows that will be returned
> from the relation, which is often less, and occasionally more, than
> the total of the rows in the relation.  The reason it's often less is
> because there might be a WHERE clause or similar which rules out some
> of the rows.  The reason it might be more is because a nested loop
> could return the same rows multiple times.

Yes, indeed. I was confused, and I guess I could've thought about it
about more before posting here. Thank you for answering this
question!

Regards,
Donald Dong



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Unlogged tables cleanup
Next
From: Robert Haas
Date:
Subject: Re: Rearranging ALTER TABLE to avoid multi-operations bugs