Prev: Conditional trigger missing from pg_dump
Next: question (or feature-request): over ( partition by ... order by LIMIT N)
From: David Fetter on 25 Mar 2010 17:17 On Wed, Mar 24, 2010 at 06:31:59PM +0100, A. Kretschmer wrote: > Hello @all, > > I know, i can do: > > select * from (select ... row_number() over (...) ...) foo where > row_number < N > > to limit the rows per group, but the inner select has to retrieve > the whole set of records and in the outer select most of them > discarded. That sounds like the optimizer's falling down on the job. Would this be difficult to fix? Cheers, David. -- David Fetter <david(a)fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter(a)gmail.com iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |