Re: [HACKERS] Efficiency of LIMIT ?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: haberlaa(at)ricochet(dot)net (Adam Haberlach)
Cc: chris(dot)bitmead(at)bigfoot(dot)com, pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] Efficiency of LIMIT ?
Date: 1999-04-25 19:41:29
Message-ID: 199904251941.PAA00652@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Sun, Apr 25, 1999 at 08:16:58AM +0000, Chris Bitmead 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.

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael J Davis 1999-04-25 21:08:54 Functions with aggregations (i.e. group by) causes an abort
Previous Message Ryan Bradetich 1999-04-25 19:32:02 Re: [HACKERS] create view as select distinct (fwd)