Re: [postgis-users] Query with LIMIT but as random result set?

From: "Kevin Grittner" <kgrittn(at)mail(dot)com>
To: "Stefan Keller" <sfkeller(at)gmail(dot)com>,"PostGIS Users Discussion" <postgis-users(at)lists(dot)osgeo(dot)org>,"pgsql-general List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [postgis-users] Query with LIMIT but as random result set?
Date: 2013-01-10 20:28:23
Message-ID: 20130110202824.255780@gmx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stefan Keller wrote:

> "... ORDER BY random() LIMIT 10;" works ok.
>
> But with the following option it gets more tricky assume:
>> And as an option the (limited) resultset should be spatially
>> distributed (not clustered).
>
> I'm thinking about some radial spatial distribution function.

So, you explicitly *don't* want a random selection?  By "spatially
distributed" you mean that if you have already chosen one
particular location, other locations which are close to it should
be less probable (or impossible) to include in the limited result
set? How would you define the desired result? The one with the
highest best solution to the "traveling salesman" problem?

-Kevin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message wschwurack 2013-01-10 21:33:11 Re: Error: absolute path not allowed
Previous Message Kevin Grittner 2013-01-10 17:08:39 Re: When to run Vacuum in postgres 9.0.4