Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E767D9FB99B for ; Thu, 26 Apr 2007 19:45:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 06691-05 for ; Thu, 26 Apr 2007 19:45:16 -0300 (ADT) X-Greylist: delayed 01:04:51.600066 by SQLgrey-1.7.4 Received: from www.propertykey.com (unknown [64.122.63.226]) by postgresql.org (Postfix) with ESMTP id 1B6239FB7FF for ; Thu, 26 Apr 2007 19:45:15 -0300 (ADT) Received: from [10.0.1.4] (go-to-jail.propertykey.com [10.0.1.4]) by www.propertykey.com (8.11.6/8.11.6) with ESMTP id l3QLeGE14591; Thu, 26 Apr 2007 16:40:16 -0500 Message-ID: <46311C41.4000906@propertykey.com> Date: Thu, 26 Apr 2007 16:40:17 -0500 From: Jeff Hoffmann User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: zardozrocks CC: pgsql-performance@postgresql.org Subject: Re: Simple query, 10 million records...MySQL ten times faster References: <1177450006.547698.120920@u32g2000prd.googlegroups.com> In-Reply-To: <1177450006.547698.120920@u32g2000prd.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/445 X-Sequence-Number: 24322 zardozrocks wrote: > I have this table: > > CREATE TABLE test_zip_assoc ( > id serial NOT NULL, > f_id integer DEFAULT 0 NOT NULL, > lat_radians numeric(6,5) DEFAULT 0.00000 NOT NULL, > long_radians numeric(6,5) DEFAULT 0.00000 NOT NULL > ); > CREATE INDEX lat_radians ON test_zip_assoc USING btree (lat_radians); > CREATE INDEX long_radians ON test_zip_assoc USING btree > (long_radians); Maybe I'm missing something, but wouldn't it be easier to just use PostGIS? Or failing that, using the vanilla built-in point type and an r-tree index? That's what r-tree indexes are made for. -- Jeff Hoffmann Head Plate Spinner PropertyKey.com