public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ilia Evdokimov <[email protected]>
To: Robert Haas <[email protected]>
To: Tom Lane <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: Andrei Lepikhov <[email protected]>
Cc: [email protected]
Cc: Guillaume Lelarge <[email protected]>
Cc: Matheus Alcantara <[email protected]>
Cc: Alena Rybakina <[email protected]>
Subject: Re: explain analyze rows=%.0f
Date: Mon, 31 Mar 2025 23:59:48 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmobMEbWEDsKQ5ezaBEnwcWLcTef5yupx2bOj03aKj1GvRA@mail.gmail.com>
References: <CA+TgmoZv8DvmeQHQAX+rkn68id2N+DoUhFZB36d-_w1tyAeqeA@mail.gmail.com>
<[email protected]>
<CA+TgmoZp7LstKmDwyfUuB+6aFFhn0N3fv2QxTD=dkrxXVJ5dZA@mail.gmail.com>
<CA+TgmoazzVHn8sFOMFAEwoqBTDxKT45D7mvkyeHgqtoD2cn58Q@mail.gmail.com>
<[email protected]>
<CA+TgmoZxRP8cEhfdF27k600B_=8DXpj=8kiM7s_6qCHCqxQPmA@mail.gmail.com>
<CA+TgmoapgkOFmezwVjJbs5Xq9F+Mfm9aNouBgTq_AuqQJkLYEg@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAEze2Wiap5v-H-5QqGq-=DBG99CK-RgHpQUFaU6TENh_+zCh_w@mail.gmail.com>
<CA+TgmobD4_fz4JnGkYey_2rsXi5mxucDPR2ot6rX9OoHBw+qhg@mail.gmail.com>
<[email protected]>
<CA+Tgmob2FcdNQnfv20hFHMiQjqsmak4NnkmxjNQnNpzzbowmgQ@mail.gmail.com>
<CA+TgmoZz-t4swNuD--8brJi69b4ZAJ6riamd6hVJmvNL0L5=wA@mail.gmail.com>
<[email protected]>
<CA+TgmobMEbWEDsKQ5ezaBEnwcWLcTef5yupx2bOj03aKj1GvRA@mail.gmail.com>
On 31.03.2025 22:09, Robert Haas wrote:
> Oh, right. I've never really understood why we round off to integers,
> but the fact that we don't allow row counts < 1 feels like something
> pretty important. My intuition is that it probably helps a lot more
> than it hurts, too.
We definitely shouldn’t remove the row counts < 1 check, since there are
many places in the planner where we divide by rows. This mechanism was
added specifically to prevent division by zero. Also, allowing rows
estimates below 1 can sometimes make the planner overly optimistic,
leading it to prefer cheaper-looking plans that may not perform well in
practice. For example, choosing a Nested Loop instead of a more
appropriate Hash Join.
Allowing fractional rows > 1 might help improve planner accuracy in some
cases, but this needs further study to fully understand the impact.
--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.
view thread (77+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: explain analyze rows=%.0f
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox