X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 0F83CD1B53A for ; Wed, 12 Nov 2003 09:33:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 51179-05 for ; Wed, 12 Nov 2003 05:32:32 -0400 (AST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by svr1.postgresql.org (Postfix) with ESMTP id 3B2D9D1B4ED for ; Wed, 12 Nov 2003 05:32:30 -0400 (AST) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AJrMV-0004bi-00 for ; Wed, 12 Nov 2003 10:32:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AJrMU-0004bY-00 for ; Wed, 12 Nov 2003 10:32:30 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AJrMU-0002Sr-00 for ; Wed, 12 Nov 2003 10:32:30 +0100 From: Troels Arvin Subject: Re: Quota query with decent performance? Date: Wed, 12 Nov 2003 10:32:30 +0100 Lines: 14 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/134 X-Sequence-Number: 15949 On Tue, 11 Nov 2003 18:49:31 -0500, Chester Kustarz wrote: [... cut efficient top-3 youngest query wanted ...] > select * > from person > where age <= > (select age from person order by age limit 1 offset 2); Thanks - it works; why didn't I think of that? -- Greetings from Troels Arvin, Copenhagen, Denmark