Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: consistent random order



Michael,

I think you may have solved my problem. We're still experimenting with it but I think setseed is going to work. Thank you very, very much!

Jeff Herrin

----- Original Message -----
From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Jeff Herrin <jeff(at)alternateimage(dot)com>
Cc: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>, pgsql-sql(at)postgresql(dot)org
Sent: Thursday, November 30, 2006 2:58:23 AM GMT-0500 US/Eastern
Subject: Re: [SQL] consistent random order

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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group