pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Adjust cost model for HashAgg that spills to disk.
Date: Mon, 07 Sep 2020 20:45:22 +0000
Message-ID: <E1kFO0w-0004Qz-1U@gemulon.postgresql.org> (raw)

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(+)



view thread (2+ messages)

Message-ID: <E1kFO0w-0004Qz-1U@gemulon.postgresql.org>
Permalink:  ../E1kFO0w-0004Qz-1U@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kFO0w-0004Qz-1U@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: jdavis@postgresql.org
  Subject: Re: pgsql: Adjust cost model for HashAgg that spills to disk.
  In-Reply-To: <E1kFO0w-0004Qz-1U@gemulon.postgresql.org>
  References: <E1kFO0w-0004Qz-1U@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox