Re: On disable_cost
От | Greg Sabino Mullane |
---|---|
Тема | Re: On disable_cost |
Дата | |
Msg-id | CAKAnmm+1TbqTnZ0HtN0ir5BUX=yHEWCCb5U_N_YkKk_ytX6xhA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: On disable_cost (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: On disable_cost
|
Список | pgsql-hackers |
On Mon, Apr 1, 2024 at 7:54 PM Robert Haas <robertmhaas@gmail.com> wrote:
What I think we're mostly doing in the regression tests is shutting
off every relevant type of plan except one. I theorize that what we
actually want to do is tell the planner what we do want to happen,
rather than what we don't want to happen, but we've got this weird set
of GUCs that do the opposite of that and we're super-attached to them
because they've existed forever.
So rather than listing all the things we don't want to happen, we need a way to force (nay, highly encourage) a particular solution. As our costing is a based on positive numbers, what if we did something like this in costsize.c?
Cost disable_cost = 1.0e10;
Cost promotion_cost = 1.0e10; // or higher or lower, depending on how strongly we want to "beat" disable_costs effects.
...
if (!enable_seqscan)
startup_cost += disable_cost;
startup_cost += disable_cost;
else if (promote_seqscan)
startup_cost -= promotion_cost; // or replace "promote" with "encourage"?
Greg
В списке pgsql-hackers по дате отправления: