Re: Random via Subselect or Temporary Table

From: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Random via Subselect or Temporary Table
Date: 2003-08-09 03:44:20
Message-ID: 1488.63.226.186.156.1060400660.squirrel@mail.minnesota.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<quote who="Tom Lane">

> I'd suggest using DISTINCT ON (catnum) with ORDER BY catnum, random().
> See the SELECT reference page's "weather reports" example for
> background.

Good suggestion. Thank you Tom.

Thomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-08-09 15:11:43 Re: The database is very slow !
Previous Message Tom Lane 2003-08-09 03:29:42 Re: 7.3.3 behaving differently on OS X 10.2.6 and FreeBSD