Re: A minor adjustment to get_cheapest_path_for_pathkeys
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Aleksander Alekseev <aleksander@timescale.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>,
Richard Guo <guofenglinux@gmail.com>
Date: 2023-09-05T17:14:40Z
Lists: pgsql-hackers
On Tue, Sep 5, 2023 at 12:05 PM Aleksander Alekseev <aleksander@timescale.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
Commits
-
Reorder tests in get_cheapest_path_for_pathkeys().
- 9caf042088e7 17.0 landed
-
Fix an assortment of improper usages of string functions
- 8b26769bc441 16.0 cited