Re: is it possible to make this faster?

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

 



On 5/25/06, Bruno Wolff III <bruno@xxxxxxxx> wrote:
On Thu, May 25, 2006 at 16:07:19 -0400,
  Merlin Moncure <mmoncure@xxxxxxxxx> wrote:
> been doing a lot of pgsql/mysql performance testing lately, and there
> is one query that mysql does much better than pgsql...and I see it a
> lot in normal development:
>
> select a,b,max(c) from t group by a,b;
>

SELECT DISTINCT ON (a, b) a, b, c FROM t ORDER BY a DESC, b DESC, c DESC;

that is actually slower than group by in my case...am i missing
something? (both essentially resolved to seq_scan)

merlin


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

  Powered by Linux