Re: Aggregate and many LEFT JOIN - Mailing list pgsql-performance

From Jeff Janes
Subject Re: Aggregate and many LEFT JOIN
Date
Msg-id CAMkU=1yOtT4xA4SfuPdEqKxcFPNwjXByC5a6f=Tua__yZkAVAQ@mail.gmail.com
Whole thread Raw
In response to Re: Aggregate and many LEFT JOIN  (kimaidou <kimaidou@gmail.com>)
List pgsql-performance
On Mon, Feb 25, 2019 at 3:54 AM kimaidou <kimaidou@gmail.com> wrote:
 
Wich strikes me is that if I try to simplify it a lot, removing all data but the main table (occtax.observation) primary key cd_nom and aggregate, the query plan should be able tu use the cd_nom index for sorting and provide better query plan (hash aggregate), but it does not seems so :

HashAggregate doesn't support aggregates with DISTINCT.  I don't think there is any reason it can't, it is just that no one has gotten around to it.

Aggregates with DISTINCT also kill your ability to get parallel queries.

Cheers,

Jeff

pgsql-performance by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Aggregate and many LEFT JOIN
Next
From: Michael Lewis
Date:
Subject: Re: Query slow for new participants