Re: select distinct runs slow on pg 10.6

From: yash mehta <yash215(at)gmail(dot)com>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: Flo Rance <trourance(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: select distinct runs slow on pg 10.6
Date: 2019-09-10 04:53:01
Message-ID: CAMgY1Wn5nTexxb4wSfLGABULu5jkGQr4Fs6kYvKqYEBO1Vi4NA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi Michael/Justin/Flo,

Thank you all for your assistance. As Michael said, looks like there are no
more tricks left.

On Mon, Sep 9, 2019 at 9:09 PM Michael Lewis <mlewis(at)entrata(dot)com> wrote:

> If you can't modify the query, then there is nothing more to be done to
> optimize the execution afaik. Distinct is much slower than group by in
> scenarios like this with many columns. You already identified the disk sort
> and increased work mem to get it faster by 3x. There are not any other
> tricks of which I am aware.
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Rick Otten 2019-09-10 11:56:54 Re: select distinct runs slow on pg 10.6
Previous Message Michael Lewis 2019-09-09 15:39:27 Re: select distinct runs slow on pg 10.6