Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtOjp-0003jL-23 for pgsql-general@arkaria.postgresql.org; Thu, 10 Jan 2013 20:28:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TtOjo-0008Ay-1t for pgsql-general@arkaria.postgresql.org; Thu, 10 Jan 2013 20:28:32 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtOjm-0008As-U4 for pgsql-general@postgresql.org; Thu, 10 Jan 2013 20:28:30 +0000 Received: from mout.gmx.net ([74.208.4.200]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtOjk-0006mC-Jt for pgsql-general@postgresql.org; Thu, 10 Jan 2013 20:28:30 +0000 Received: from mailout-us.gmx.com ([172.19.198.45]) by mrigmx.server.lan (mrigmxus001) with ESMTP (Nemesis) id 0Lta9Q-1Ssrz51Bum-010x74 for ; Thu, 10 Jan 2013 21:28:27 +0100 Received: (qmail 21060 invoked by uid 0); 10 Jan 2013 20:28:26 -0000 Received: from 76.255.19.161 by rms-us006 with HTTP Content-Type: text/plain; charset="utf-8" Date: Thu, 10 Jan 2013 15:28:23 -0500 From: "Kevin Grittner" Message-ID: <20130110202824.255780@gmx.com> MIME-Version: 1.0 Subject: Re: [postgis-users] Query with LIMIT but as random result set? To: "Stefan Keller" ,"PostGIS Users Discussion" ,"pgsql-general List" X-Authenticated: #138763884 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: P0GdcI4C3zOlOQ09Lnwhs3d+IGRvb0CT X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org 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