X-Original-To: pgsql-advocacy-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B1CF253369 for ; Mon, 28 Mar 2005 16:56:03 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88311-02 for ; Mon, 28 Mar 2005 15:56:01 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 9157F52A35 for ; Mon, 28 Mar 2005 16:55:59 +0100 (BST) Received: (qmail 9383 invoked by uid 500); 28 Mar 2005 16:12:40 -0000 Date: Mon, 28 Mar 2005 10:12:40 -0600 From: Bruno Wolff III To: Virgile Beddok Cc: Tom Lane , Christopher Kings-Lynne , pgsql-novice@postgresql.org, pgsql-advocacy@postgresql.org Subject: Re: [NOVICE] Function which gives back the nearest neighbours Message-ID: <20050328161240.GD7217@wolff.to> Mail-Followup-To: Bruno Wolff III , Virgile Beddok , Tom Lane , Christopher Kings-Lynne , pgsql-novice@postgresql.org, pgsql-advocacy@postgresql.org References: <2657.146.140.8.144.1111775776.squirrel@webmail.igd.fraunhofer.de> <42464392.9040903@familyhealth.com.au> <20050327163653.GH9280@wolff.to> <5796.1111941132@sss.pgh.pa.us> <1218.146.140.8.94.1112025141.squirrel@webmail.igd.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1218.146.140.8.94.1112025141.squirrel@webmail.igd.fraunhofer.de> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/122 X-Sequence-Number: 6550 On Mon, Mar 28, 2005 at 17:52:21 +0200, Virgile Beddok wrote: > Thanks for the help. > I'll try this for the one-dimensional search. > For the muti-dimensional one, which tools of postgresql could I use for > this metric function, or this indexable search, which Bruno mentioned. > Do they already exist? > What about using a tree for that? Is there one which could fit to such a > "nearest neighbour search", or do I have to implement it myself... You could look at boxes or cubes. You haven't said enough about your multidimensional problem to give specific answers.