Re: Sorted group by

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

 



Matthew Wakeling <matthew@xxxxxxxxxxx> wrote:
 
> I'm trying to eke a little bit more performance out of an
> application
 
In addition to the suggestion from Thomas Kellerer, it would be
interesting to try the following and see how performance compares
using real data.
 
select group, value from tbl x
  where not exists
        (select * from tbl y
          where y.group = x.group and y.number > x.number);
 
We have a lot of code using this general technique, and I'm curious
whether there are big gains to be had by moving to the windowing
functions.  (I suspect there are.)
 
-Kevin

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


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

  Powered by Linux