From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: Cédric Dufour <cedric.dufour@freesurf.ch>
To: pgsql-sql@postgresql.org
Subject: Re: Random resultset retrieving -> performance bottleneck
Date: Sat, 3 Aug 2002 18:09:55 +0800
Message-ID: <009401c23ad5$eb6512f0$0200a8c0@SOL> (raw)
References: <NDBBIFNBODNADCAOFDOAKEIOCDAA.cedric.dufour@freesurf.ch>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: chriskl@familyhealth.com.au, cedric.dufour@freesurf.ch
Subject: Re: Random resultset retrieving -> performance bottleneck
In-Reply-To: <009401c23ad5$eb6512f0$0200a8c0@SOL>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox