Re: Trouble with hashagg spill I/O pattern and costing

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Jeff Davis <pgsql@j-davis.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-05-21T17:05:25Z
Lists: pgsql-hackers
On Thu, May 21, 2020 at 10:45 AM Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> So the pre-allocation makes it 10x faster, and the tlist tweak makes it
> 5x faster. Not bad, I guess.

That is pretty great stuff, Tomas.

FWIW, I agree that CP_SMALL_TLIST seems like the right thing here.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Commits

  1. Use CP_SMALL_TLIST for hash aggregate

  2. Avoid fragmentation of logical tapes when writing concurrently.