Re: Disk-based hash aggregate's cost model

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Peter Geoghegan <pg@bowt.ie>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-07T20:55:28Z
Lists: pgsql-hackers
On Sun, 2020-09-06 at 23:21 +0200, Tomas Vondra wrote:
> I've tested the costing changes on the simplified TPC-H query, on two
> different machines, and it seems like a clear improvement.

Thank you. Committed.

> So yeah, the patched costing is much closer to sort (from the point
> of
> this cost/duration metric), although for higher work_mem values
> there's
> still a clear gap where the hashing seems to be under-costed by a
> factor
> of ~2 or more.

There seems to be a cliff right after 4MB. Perhaps lookup costs on a
larger hash table?

Regards,
	Jeff Davis




Commits

  1. Adjust cost model for HashAgg that spills to disk.