Re: Sorted group by - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Sorted group by
Date
Msg-id 4C613A04020000250003441E@gw.wicourts.gov
Whole thread Raw
In response to Sorted group by  (Matthew Wakeling <matthew@flymine.org>)
Responses Re: Sorted group by
List pgsql-performance
Matthew Wakeling <matthew@flymine.org> 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

pgsql-performance by date:

Previous
From: Thom Brown
Date:
Subject: Re: Sorted group by
Next
From: Jonathan Blitz
Date:
Subject: Re: Sorted group by