Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id CA23F63509A; Mon, 25 May 2009 10:43:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 33640-02-9; Mon, 25 May 2009 10:43:04 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f174.google.com (mail-fx0-f174.google.com [209.85.220.174]) by mail.postgresql.org (Postfix) with ESMTP id 30B7F634C2A; Mon, 25 May 2009 10:42:28 -0300 (ADT) Received: by fxm22 with SMTP id 22so3332802fxm.19 for ; Mon, 25 May 2009 06:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=RXT8HsxWlu5AWeZDKywx8/D0F2xvrd1Kz9tRr3/lxA8=; b=Atkm443Tek7Ghz1/8aWMQFyEBAjBkChVFZYefIu0Bi/w7/gDCU8glLsJH3OZ+PhViP GA8CTfDmDy59tRHpnzh9M7wVOEohybO/VF6n45GLLc+0Bo52B+WWw0H+rFHQGhpyRGHD FAbyNGed1RtD0/ASgeiKKDG6KffF9uql/iunM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=MEvaQ+mptJ4XAK3/sew6Sh9Sgo/UhanlKJd2U6uewCkhZlZjeCNtkWgnvug+nqx2oU 5ZDKlliKCoHag40Xd+uNgtF35vrYMT6eGGy/cxHSLvPNKMhXduZcFIVxkOYY6lyIB65r oy73EI8sOagsFFwXc1u2jU6c64WiMZ2vE7p50= MIME-Version: 1.0 Received: by 10.239.130.196 with SMTP id 4mr446190hbk.17.1243258944462; Mon, 25 May 2009 06:42:24 -0700 (PDT) In-Reply-To: <020201c9dd3d$372c3f40$ec5a3d0a@marktestcr.marktest.pt> References: <020201c9dd3d$372c3f40$ec5a3d0a@marktestcr.marktest.pt> Date: Mon, 25 May 2009 10:42:24 -0300 Message-ID: <252e1f290905250642w66c6b962k248624b5327be043@mail.gmail.com> Subject: Re: Obtaining a limited number of records from a long query From: Luiz Eduardo Cantanhede Neri To: Oliveiros Cristina Cc: pgsql-sql@postgresql.org, pgsql-novice@postgresql.org Content-Type: multipart/alternative; boundary=001636499069bfa076046abcc78e X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200905/85 X-Sequence-Number: 21445 --001636499069bfa076046abcc78e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Visit http://www.sqlzoo.net/howto/source/z.dir/tip915069/postgres and u'll get ur awnser and others like from 11th and on. For now you may try SELECT * FROM cia LIMIT 10 On Mon, May 25, 2009 at 10:32 AM, Oliveiros Cristina < oliveiros.cristina@marktest.pt> wrote: > Dear List, > > Is there any way to force a query to return just a few records? > > For ex, returning just the first ten rows from a long ORDER BY query ? > > And then, eventually, obtaining the remaining records at a later time, or > in background? > > Thanks in advance for your help, > > Best, > Oliveiros > --001636499069bfa076046abcc78e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Visit http://www.sqlzoo.net/howto/source/z.dir/tip915069/postgres and u= 9;ll get ur awnser and others like from 11th and on.

For now you may= try SELECT * FROM cia LIMIT 10

On Mon, May 25, 2009 at 10:32 AM, Oliveiros = Cristina <oliveiros.cristina@marktest.pt> wrote:
Dear List,
=A0
Is there any way to force a query to r= eturn just a=20 few records?
=A0
For ex, returning just the first ten r= ows from a=20 long ORDER BY query ?
=A0
And then, eventually, obtaining the re= maining=20 records at a later time, or in background?
=A0
Thanks in advance for your help,
=A0
Best,
Oliveiros

--001636499069bfa076046abcc78e--