Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id EFE4F2E002C for ; Mon, 7 Apr 2008 15:35:39 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 63449-08 for ; Mon, 7 Apr 2008 15:35:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by developer.postgresql.org (Postfix) with ESMTP id C33772E0046 for ; Mon, 7 Apr 2008 15:35:34 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JiwBl-0006PG-I8 for pgsql-performance@postgresql.org; Mon, 07 Apr 2008 18:35:29 +0000 Received: from frigga.summersault.com ([12.161.105.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Apr 2008 18:35:29 +0000 Received: from mark by frigga.summersault.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Apr 2008 18:35:29 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Mark Stosberg Subject: what worked: performance improvements for geo-spatial searching on FreeBSD Date: Mon, 07 Apr 2008 14:35:14 -0400 Lines: 22 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: frigga.summersault.com User-Agent: Thunderbird 2.0.0.12 (X11/20080227) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/67 X-Sequence-Number: 29560 The http://www.1-800-save-a-pet.com site is hosted with FreeBSD and PostgreSQL and as a geo-spatial search as a central feature. One thing that made a substantial performance improvement was switching from the "geo_distance()" search in the earthdistance contrib, to use the "cube" based geo-spatial calculations, also in available in contrib/ In our case, the slight loss of precision between the two methods didn't matter. The other things that made a noticeable performance improvement was upgrading our servers from FreeBSD 4.x or 5.x (old, I know!) to FreeBSD 6.2 or later. We also upgrade these systems from PostgreSQL 8.1 to 8.2 at the same time. I assume the upgrade to 8.2 must be responsible at least in part for the performance gains. The result of these two rounds of updates is that our overall CPU capacity in the cluster seems to be double or triple what it was before. As the site grows we continue to be very happy with the performance, features and stability of PostgreSQL. Mark