Re: Group by and limit

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: reid(dot)thompson(at)ateb(dot)com
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Group by and limit
Date: 2010-11-03 09:03:12
Message-ID: m2lj5aye27.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Reid Thompson <reid(dot)thompson(at)ateb(dot)com> writes:
> I only want the first 500 for each x.
> Any tips or tricks someone might know would be appreciated.
> I’m using postgres 8.3.7.

http://troels.arvin.dk/db/rdbms/#select-top-n

Consider using a more recent version of PostgreSQL, equipped with window
functions!

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2010-11-03 10:15:23 Re: Why Select Count(*) from table - took over 20 minutes?
Previous Message Jasen Betts 2010-11-03 06:15:22 timestamps in Australia