Re: Which one is faster?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Wei Weng <wweng(at)kencast(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Which one is faster?
Date: 2002-06-19 20:34:49
Message-ID: 200206192034.g5JKYn616099@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Wei Weng wrote:
> Between Using Limit P, S or using a cursor to start from FETCH ABSOLUTE
> S and FETCH NEXT for P times, which one is faster?

LIMIT is faster because it doesn't need to generate all the result, in
some cases.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(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-sql by date

  From Date Subject
Next Message afa 2002-06-19 20:45:25 Assign values to array
Previous Message Wei Weng 2002-06-19 19:56:19 Re: syntax for access an alias in the where clause ?