Re: select distinct runs slow on pg 10.6

2019-09-11 Thread Rick Otten
On Wed, Sep 11, 2019 at 12:38 PM Dinesh Somani wrote: > I think Merlin has outlined pretty much all the options and very neatly. > (As an asides Merlin could you possibly elaborate on the "C Hack" how that > might be accomplished.) > > To OP, I am curious if the performance changes were the query

Re: select distinct runs slow on pg 10.6

2019-09-11 Thread Dinesh Somani
I think Merlin has outlined pretty much all the options and very neatly. (As an asides Merlin could you possibly elaborate on the "C Hack" how that might be accomplished.) To OP, I am curious if the performance changes were the query rewritten such that all timestamp columns were listed first in t

Re: select distinct runs slow on pg 10.6

2019-09-11 Thread Merlin Moncure
On Mon, Sep 9, 2019 at 3:55 AM yash mehta wrote: > > We have a query that takes 1min to execute in postgres 10.6 and the same > executes in 4 sec in Oracle database. The query is doing 'select distinct'. > If I add a 'group by' clause, performance in postgres improves significantly > and fetche