Re: [Testcase] Queries running forever, because of wrong rowcount estimate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter <pmc(at)citylink(dot)dinoex(dot)sub(dot)org>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: [Testcase] Queries running forever, because of wrong rowcount estimate
Date: 2023-02-13 17:38:12
Message-ID: 1265870.1676309892@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter <pmc(at)citylink(dot)dinoex(dot)sub(dot)org> writes:
> "rows=1" in the "Hash Anti Join" line is WRONG. It should be
> 3000000. Or at least some thousands.

FWIW, this behaves better in v14 and up. In older versions there's
an ambiguity about what relpages=reltuples=0 means; it's the state
when ANALYZE has never yet examined the table contents, but it's
also the state when we have found the table to be empty. Because
of the former case, older planner versions don't like to believe
that a table is empty even if reltuples says so.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter 2023-02-13 18:18:13 Re: [Testcase] Queries running forever, because of wrong rowcount estimate
Previous Message Brad White 2023-02-13 17:34:30 Re: Quoting issue from ODBC