Re: is it possible to make this faster?

From: "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: is it possible to make this faster?
Date: 2006-05-25 21:08:50
Message-ID: 20060525210850.GA20274@uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, May 25, 2006 at 04:54:09PM -0400, Merlin Moncure wrote:
>> select a,b,(select c from t t2 order by c desc where t1.a=t2.a and
>> t1.b=t2.b)
>> from t t1 group by a,b;
> this came out to a tie with the group by approach, although it
> produced a different (but similar) plan. we are still orders of
> magnitude behind mysql here.

Actually, it _should_ produce a syntax error -- it's missing a LIMIT 1 in the
subquery.

/* Steinar */
--
Homepage: http://www.sesse.net/

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-05-25 21:11:37 Re: is it possible to make this faster?
Previous Message Merlin Moncure 2006-05-25 20:54:09 Re: is it possible to make this faster?