pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@mail.com>
To: Stefan Keller <sfkeller@gmail.com>
To: PostGIS Users Discussion <postgis-users@lists.osgeo.org>
To: pgsql-general List <pgsql-general@postgresql.org>
Subject: Re: [postgis-users] Query with LIMIT but as random result set?
Date: Thu, 10 Jan 2013 15:28:23 -0500
Message-ID: <20130110202824.255780@gmx.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (8+ messages)  latest in thread

Message-ID: <20130110202824.255780@gmx.com>
Permalink:  ../20130110202824.255780@gmx.com/
Also on:    postgresql.org/message-id/20130110202824.255780@gmx.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: kgrittn@mail.com, sfkeller@gmail.com, postgis-users@lists.osgeo.org
  Subject: Re: [postgis-users] Query with LIMIT but as random result set?
  In-Reply-To: <20130110202824.255780@gmx.com>
  References: <20130110202824.255780@gmx.com>

* 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