Re: Should we update the random_page_cost default value? - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: Should we update the random_page_cost default value?
Date
Msg-id a750a924ac8a1bf87ef19f9af6733f9a664180cf.camel@cybertec.at
Whole thread Raw
In response to Re: Should we update the random_page_cost default value?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2025-10-06 at 01:53 -0400, Tom Lane wrote:
> Laurenz Albe <laurenz.albe@cybertec.at> writes:
> > On Mon, 2025-10-06 at 01:29 -0400, Tom Lane wrote:
> > > But if what
> > > we're trying to model is net resource demands, with an eye to
> > > minimizing the total system load not execution time of any one query,
> > > maybe we can continue to work with something close to what we've
> > > traditionally done.
>
> > Did anybody propose that?
>
> I just did ;-).  If we don't adopt a mindset along that line,
> then AIO is going to require some *radical* changes in the
> planner's I/O cost models.

I see your point, and actually the idea of the planner targeting
the lowest resource usage ist quite attractive.  That is, in a
situation where you want to optimize throughput.  I regularly
find myself advising users that if their CPU load is approaching
100%, they had better disable parallel query.

But I am afraid that that would pessimize plans for analytical
queries, where your sole goal is a low response time.

This is far from a serious proposal, but perhaps there could be
a parameter "optimizer_goal" with values "throughput", "response_time"
and "mixed" that determines the default value for other parameters...

Yours,
Laurenz Albe



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: split func.sgml to separated individual sgml files
Next
From: Tomas Vondra
Date:
Subject: Re: Should we update the random_page_cost default value?