Re: bad performance

From: Jeremy Harris <jgh(at)wizmail(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: bad performance
Date: 2016-12-25 13:33:55
Message-ID: 9d8bede6-ce73-50a1-a6bc-53b77d168168@wizmail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 17/12/16 23:04, Tom Lane wrote:
> so that you don't need to use
> SELECT DISTINCT? The sort/unique steps needed to do DISTINCT are
> eating a large part of the runtime,

Does a hash join result in a set of buckets that are then read out
in order? It might, unless the sort method takes advantage of
partially-sorted inout, be cheaper (by log(num-buckets)) to sort/uniq
each bucket separately (and it would parallelize, too).
--
Cheers,
Jeremy

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Dinesh Chandra 12108 2016-12-27 09:24:17 Invalid page header in block 25561983 of relation pg_tblspc
Previous Message ProPAAS DBA 2016-12-21 18:16:28 Re: How to vacuum entire database excluding some tables in PostgreSQL9.1.