Re: Trouble with hashagg spill I/O pattern and costing - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Trouble with hashagg spill I/O pattern and costing
Date
Msg-id f8474785901b8c72fe86096c314908924cc8e5c1.camel@j-davis.com
Whole thread Raw
In response to Re: Trouble with hashagg spill I/O pattern and costing  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Tue, 2020-05-26 at 17:40 -0700, Jeff Davis wrote:
> On Tue, 2020-05-26 at 21:15 +0200, Tomas Vondra wrote:
> > Yeah. I agree prefetching is definitely out of v13 scope. It might
> > be
> > interesting to try how useful would it be, if you're willing to
> > spend
> > some time on a prototype.
> 
> I think a POC would be pretty quick; I'll see if I can hack something
> together.

Attached (intended for v14).

I changed the list from a simple array to a circular buffer so that we
can keep enough preallocated block numbers in it to do prefetching.

On SSD I didn't see any improvement, but perhaps it will do better on
magnetic storage.

Regards,
    Jeff Davis


Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Make the qual cost on index Filter slightly higher than qualcost on index Cond.
Next
From: Andres Freund
Date:
Subject: Re: segmentation fault using currtid and partitioned tables