Re: Cost Model - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Cost Model
Date
Msg-id 20171220193458.mrzqs3qjxt3j4omy@alap3.anarazel.de
Whole thread Raw
In response to Re: Cost Model  (neto brpr <netobrpr@gmail.com>)
Responses Re: Cost Model
List pgsql-hackers
On 2017-12-20 17:13:31 -0200, neto brpr wrote:
> Just to explain it better. The idea of ​​differentiating read and write
> parameters (sequential and random) is exactly so that the access plans can
> be better chosen by the optimizer. But for this, the Hash join, merge join,
> sorting and other algorithms should also be changed to consider these new
> parameters.

I'm doubtful that there's that much benefit. Mergejoin doesn't write,
hashjoins commonly don't write , and usually if so there's not that many
alternatives to batched hashjoins. Similar-ish with sorts, although
sometimes that can instead be done using ordered index scans.

What are the cases you forsee where costing reads/writes differently
will lead to better plans?

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Cost Model
Next
From: Dan Langille
Date:
Subject: PGCon 2018 call for papers