Re: Getting a random row

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Shaul Dar <shauldar(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Getting a random row
Date: 2009-10-13 15:19:40
Message-ID: 2f4958ff0910130819q22fd9cct25064ceddf128be7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Oct 13, 2009 at 4:17 PM, Shaul Dar <shauldar(at)gmail(dot)com> wrote:

> Hi,
>
> I am running performance simulation against a DB. I want to randomly pull
> different records from a large table. However the table has no columns that
> hold sequential integer values (1..MAX), i.e. the columns all have "holes"
> (due to earlier filtering).
>
what do yo umean ? you can restrict range of integer column (or any other
type) with constraints, for instance CHECK foo( a between 1 and 100);

> Also PG does not have a concept of an auto-increment pseudo-column like
> Oracle's "rownum". Any suggestions?
>
not true - it has sequences, and pseudo type serial. Rtfm!.

--
GJ

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Thomas Kellerer 2009-10-13 15:29:40 Re: Getting a random row
Previous Message Shaul Dar 2009-10-13 15:17:10 Getting a random row