From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Richard Guo <guofenglinux(at)gmail(dot)com> |
Subject: | Re: A minor adjustment to get_cheapest_path_for_pathkeys |
Date: | 2023-09-05 17:14:40 |
Message-ID: | CA+TgmoZJ0a_Dcn+ST4YSeSrLnnmajmcsi7ZvEpgkKNiF0SwBuw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 5, 2023 at 12:05 PM Aleksander Alekseev
<aleksander(at)timescale(dot)com> wrote:
> Now when we continue reviewing the patch, could you please elaborate a
> bit on why you think it's worth committing?
Well, why not? The test he's proposing to move earlier doesn't involve
calling a function, so it should be cheaper than the one he's moving
it past, which does.
I mean, I don't know whether the savings are going to be measurable on
a benchmark, but I guess I don't particularly see why it matters. Why
write a function that says "this thing is cheaper so we test it first"
and then perform a cheaper test afterwards? That's just silly. We can
either change the comment to say "we do this first for no reason even
though it would be more sensible to do the cheap test first" or we can
reorder the tests to match the principle set forth in the existing
comment.
I mean, unless there's some reason why it *isn't* cheaper. In that
case we should have a different conversation...
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2023-09-05 17:15:43 | Re: information_schema and not-null constraints |
Previous Message | Bruce Momjian | 2023-09-05 17:06:06 | Re: PATCH: document for regression test forgets libpq test |