Re: [HACKERS] What about LIMIT in SELECT ?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: scrappy(at)hub(dot)org (Marc G(dot) Fournier)
Cc: eric(at)linux-hw(dot)com, jeff(at)remapcorp(dot)com, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] What about LIMIT in SELECT ?
Date: 1998-10-13 21:18:34
Message-ID: 199810132118.RAA11266@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

> Ookay, I'm sorry, butyou lost me here. I haven't gotten into using
> CURSORs/FETCHs yet, since I haven't need it...but can you give an example
> of what you would want to do using a LIMIT? I may be missing something,
> but wha is the different between using LIMIT to get X records, and
> definiing a cursor to FETCH X records?
>
> Practical example of *at least* the LIMIT side would be good, so that we
> can at least see a physical example of what LIMIT can do that
> CURSORs/FETCH can't...

My guess in a web application is that the transaction is started for
every new page, so you can't have transactions spanning SQL sessions.

LIMIT theoretically would allow you to start up where you left off.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Eric Lee Green 1998-10-13 22:39:01 Re: [HACKERS] What about LIMIT in SELECT ?
Previous Message Bruce Momjian 1998-10-13 21:16:54 Re: [HACKERS] What about LIMIT in SELECT ?

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 1998-10-13 21:44:56 Re: [ADMIN] COPY slows down; is it normal?
Previous Message Bruce Momjian 1998-10-13 21:16:54 Re: [HACKERS] What about LIMIT in SELECT ?