pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Jeff Herrin <jeff@alternateimage.com>
Cc: Andreas Kretschmer <akretschmer@spamfence.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: consistent random order
Date: Thu, 30 Nov 2006 00:58:23 -0700
Message-ID: <20061130075822.GA85484@winnie.fuhr.org> (raw)
In-Reply-To: <25133466.59111164821576601.JavaMail.root@srv161.carpathiahost.net>
References: <20061129172742.GA9005@KanotixBox>
	<25133466.59111164821576601.JavaMail.root@srv161.carpathiahost.net>

On Wed, Nov 29, 2006 at 12:32:56PM -0500, Jeff Herrin wrote:
> I don't think cursors are going to help in this case. The order
> by random() is still going to give different result sets on different
> pages.

Have you tried using setseed() to seed the random number generator
to the same value before each query?

-- 
Michael Fuhr



view thread (8+ messages)  latest in thread

Message-ID: <20061130075822.GA85484@winnie.fuhr.org>
Permalink:  ../20061130075822.GA85484@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20061130075822.GA85484@winnie.fuhr.org

 · 

reply

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: mike@fuhr.org, jeff@alternateimage.com, akretschmer@spamfence.net
  Subject: Re: consistent random order
  In-Reply-To: <20061130075822.GA85484@winnie.fuhr.org>

* 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