Re: select distinct runs slow on pg 10.6

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

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 yash mehta 2019-09-10 04:53:01 Re: select distinct runs slow on pg 10.6
Previous Message Flo Rance 2019-09-09 13:16:10 Re: select distinct runs slow on pg 10.6