pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Lepikhov <lepihov@gmail.com>
To: Ba Jinsheng <bajinsheng@u.nus.edu>
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: Performance Issue on Query 18 of TPC-H Benchmark
Date: Wed, 16 Oct 2024 13:28:25 +0700
Message-ID: <44b42d35-2283-4a7f-aa2d-a9abe2dcf1b6@gmail.com> (raw)
In-Reply-To: <SEZPR06MB6494B9CADF2FB15CDBCC7BBF8A452@SEZPR06MB6494.apcprd06.prod.outlook.com>
References: <SEZPR06MB6494B9CADF2FB15CDBCC7BBF8A452@SEZPR06MB6494.apcprd06.prod.outlook.com>

On 10/16/24 01:28, Ba Jinsheng wrote:
> The major differerence between both query plans is the first one has 
> additional *SORT*. I believe the second query plan is more efficient. 
> Similar to my last report, perhaps we can optimize code to enable it.
I would like to know if you can improve that case by switching from the 
sorted group to a hashed one.
I see huge underestimation because of the HAVING clause on an aggregate. 
It would be interesting to correct the prediction and observe what will 
happen.
Can you reproduce the same query using the SQL server? It would 
highlight some techniques Postgres has not adopted yet.

-- 
regards, Andrei Lepikhov






view thread (12+ messages)  latest in thread

Message-ID: <44b42d35-2283-4a7f-aa2d-a9abe2dcf1b6@gmail.com>
Permalink:  ../44b42d35-2283-4a7f-aa2d-a9abe2dcf1b6@gmail.com/
Also on:    postgresql.org/message-id/44b42d35-2283-4a7f-aa2d-a9abe2dcf1b6@gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: lepihov@gmail.com, bajinsheng@u.nus.edu, pgsql-bugs@lists.postgresql.org
  Subject: Re: Performance Issue on Query 18 of TPC-H Benchmark
  In-Reply-To: <44b42d35-2283-4a7f-aa2d-a9abe2dcf1b6@gmail.com>

* 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