Re: Does Postgresql have a similar pseudo-column "ROWNUM" as - Mailing list pgsql-sql

From Alain
Subject Re: Does Postgresql have a similar pseudo-column "ROWNUM" as
Date
Msg-id 428A2E81.2060501@pobox.com
Whole thread Raw
In response to Re: Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle?  (Andrew Sullivan <ajs@crankycanuck.ca>)
Responses Re: Does Postgresql have a similar pseudo-column "ROWNUM" as  (Ragnar Hafstað <gnari@simnet.is>)
ERROR: unterminated quoted string... help  (Postgres Admin <postgres@productivitymedia.com>)
List pgsql-sql

Andrew Sullivan escreveu:
> On Thu, May 12, 2005 at 01:07:00PM -0600, Dennis.Jiang@thomson.com wrote:
> 
>>Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle? If
>>so, we can write the following query:
> 
> 
> No.  What is the purpose of your query?  You could use ORDER BY and
> LIMIT..OFFSET to do what you want. I think.

The problem is probably speed. I have done a lot of tests, and when 
OFFSET gets to a few thousands on a multimega-recs database, it gets 
very very slow... Is there any other to work around that?

Alain


pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle?
Next
From: PFC
Date:
Subject: Re: interesting SQL puzzle - concatenating column with itself.