Re: Does Postgresql have a similar pseudo-column "ROWNUM" as

From: Alain <alainm(at)pobox(dot)com>
To: Sql-Postgre <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Does Postgresql have a similar pseudo-column "ROWNUM" as
Date: 2005-05-17 17:48:49
Message-ID: 428A2E81.2060501@pobox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php pgsql-sql

Andrew Sullivan escreveu:
> On Thu, May 12, 2005 at 01:07:00PM -0600, Dennis(dot)Jiang(at)thomson(dot)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

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Ragnar Hafstað 2005-05-17 18:12:19 Re: Does Postgresql have a similar pseudo-column "ROWNUM" as
Previous Message Andrew Sullivan 2005-05-17 17:06:36 Re: Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle?

Browse pgsql-sql by date

  From Date Subject
Next Message PFC 2005-05-17 17:57:32 Re: interesting SQL puzzle - concatenating column with itself.
Previous Message Andrew Sullivan 2005-05-17 17:06:36 Re: Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle?