Re: LIMIT Optimization - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: LIMIT Optimization
Date
Msg-id 200201251754.g0PHsvG01436@candle.pha.pa.us
Whole thread Raw
In response to Re: LIMIT Optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > So it forces our LIMIT optimization, without limiting the number of rows
> > returned.  That seems to be of questionable value.  The only value I can
> > see for it is for CURSOR queries but I don't think we can start
> > returning rows from even a cursor until the entire query is done
> > executing.
> 
> Not so at all.  However, CURSORs are already optimized on the assumption
> that not all the rows will actually get fetched.

So, it is only valuable for cursors or can we return results before the
entire query finishes for non-cursors.  The "No so at all" part has me
confused.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: LIMIT Optimization
Next
From: Oleg Bartunov
Date:
Subject: Re: Arrays Question