Re: Query with large number of joins - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: Query with large number of joins
Date
Msg-id CAHyXU0xrKAHZNhw-BPfPnnRyERP1X8jWmLyeEeo96xn4NijYug@mail.gmail.com
Whole thread Raw
In response to Re: Query with large number of joins  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Tue, Oct 21, 2014 at 11:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Marco Di Cesare <Marco.DiCesare@pointclickcare.com> writes:
>>                 COUNT(DISTINCT "foxtrot_india"."bravo_romeo")
>
> Ah.  That explains why the planner doesn't want to use a hash aggregation
> step --- DISTINCT aggregates aren't supported with those.

yup.  With this query, the planner statistics are pretty good for the
most part.  Considering that the query is generated and amount of data
is significant the runtime isn't too bad.  The query could be
rewritten to support a hash aggregate...

merlin


pgsql-performance by date:

Previous
From: "Laurent Martelli"
Date:
Subject: Re: IS NOT NULL and LEFT JOIN
Next
From: Igor Neyman
Date:
Subject: Re: extremly bad select performance on huge table