Re: Random resultset retrieving -> performance bottleneck

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: Cédric Dufour <cedric(dot)dufour(at)freesurf(dot)ch>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Random resultset retrieving -> performance bottleneck
Date: 2002-08-03 10:09:55
Message-ID: 009401c23ad5$eb6512f0$0200a8c0@SOL
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> I'm running into a performance problem when considering the following
> scenario: I have a fairly large table (1mio rows) related to other smaller
> tables (between 100 and 10000 rows) and would like to retrieve the joined
> data (through a view) in random order. In order to do so, the main table
> contains a 'Random' field (which is updated on a regular basis, in order
to
> re-randomize the data set), on which an index is created:

Have you tried adding ORDER BY RANDOM() onto your select query?

Chris

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-08-03 10:42:44 Re: What about this?
Previous Message Rajesh Kumar Mallah. 2002-08-03 05:26:43 Re: Ltree usage..