pgsql: Adjust cost model for HashAgg that spills to disk.

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Adjust cost model for HashAgg that spills to disk.
Date: 2020-09-07 20:45:22
Message-ID: E1kFO0w-0004Qz-1U@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Adjust cost model for HashAgg that spills to disk.

Tomas Vondra observed that the IO behavior for HashAgg tends to be
worse than for Sort. Penalize HashAgg IO costs accordingly.

Also, account for the CPU effort of spilling the tuples and reading
them back.

Discussion: https://postgr.es/m/20200906212112.nzoy5ytrzjjodpfh@development
Reviewed-by: Tomas Vondra
Backpatch-through: 13

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b61d048e0d480f4311c62bf3026879c83ba9aaad

Modified Files
--------------
src/backend/optimizer/path/costsize.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-09-08 01:12:47 pgsql: Add support for partitioned tables and indexes in REINDEX
Previous Message Jeff Davis 2020-09-07 20:39:56 pgsql: Adjust cost model for HashAgg that spills to disk.