Re: [HACKERS] Efficiency of LIMIT ? - Mailing list pgsql-hackers

From les@MCS.COM (Leslie Mikesell)
Subject Re: [HACKERS] Efficiency of LIMIT ?
Date
Msg-id 7g35aj$1trk$1@Venus.mcs.net
Whole thread Raw
List pgsql-hackers
In article <199904251941.PAA00652@candle.pha.pa.us>,
Bruce Momjian <maillist@candle.pha.pa.us> wrote:
>> > Is the LIMIT feature very efficient? I want to start using it for quite
>> > a few things, but I'm wondering, what happens when I have a zillion
>> > records and I want the first 10, is that going to be an efficient thing
>> > to do?
>> 
>>     I am curious about this myself.  As far as I can tell, it doesn't
>> give anything that cursors don't provide, but introduces more "features"
>> into the parser.  Do we need this?
>
>This is pretty correct, though it stops the executor from completing all
>the result queries, while cursors don't.  The complete the entire query
>and store the result for later fetches..  We support it because MySQL
>users and others asked for it.

It is a nice touch for web interfaces that are going to display
so many records for a request and not maintain any state between
requests.
 Les Mikesell   les@mcs.com


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: unknown symbol 'lo_unlink'
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Re: CORBA again. (was: light dawns: serious bug in FE/BE protocol handling)