X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9AEA54759BD for ; Tue, 11 Feb 2003 19:33:31 -0500 (EST) Received: from netbdc01.devis.com (unknown [209.219.127.12]) by postgresql.org (Postfix) with ESMTP id 11E65475925 for ; Tue, 11 Feb 2003 19:33:31 -0500 (EST) Received: from pool-138-88-6-54.res.east.verizon.net (10.10.10.12 [10.10.10.12]) by netbdc01.devis.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 1P9Y265T; Tue, 11 Feb 2003 19:33:03 -0500 Subject: Re: Working with very large datasets From: Lex Berezhny To: Wilkinson Charlie E Cc: pgsql-sql@postgresql.org In-Reply-To: <9DDDC002B736D711A7320004AC3699EB01C192C7@nct0010mb03.nc.no.irs.gov> References: <9DDDC002B736D711A7320004AC3699EB01C192C7@nct0010mb03.nc.no.irs.gov> Content-Type: text/plain Organization: Message-Id: <1045009982.6380.2.camel@buddha> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 11 Feb 2003 19:33:03 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/228 X-Sequence-Number: 11626 On Tue, 2003-02-11 at 18:42, Wilkinson Charlie E wrote: > Greetings, > Can anyone enlighten me or point me at resources concerning use of > pgsql with > very large datasets? [snip] > SELECT userid,name,size,mtime FROM users INNER JOIN files ON > users.fileid = files.fileid; If you just want to see a sample result from that query in psql, then you can use LIMIT: SELECT userid,name,size,mtime FROM users INNER JOIN files ON users.fileid = files.fileid LIMIT 100; This should only return 100 rows. I hope that helps. I think there is also a way to specify offsets so that you can return the rows in batches. -- Lex Berezhny