Re: is it possible to make this faster?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux