X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E386A9DCA70 for ; Fri, 17 Mar 2006 11:34:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93974-09 for ; Fri, 17 Mar 2006 11:34:34 -0400 (AST) X-Greylist: delayed 17:53:56.480384 by SQLgrey- Received: from crestone.coronasolutions.com (crestone.coronasolutions.com [66.45.104.24]) by postgresql.org (Postfix) with ESMTP id DBDFA9DC9A4 for ; Fri, 17 Mar 2006 11:34:27 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by crestone.coronasolutions.com (Postfix) with ESMTP id 100DA644304 for ; Fri, 17 Mar 2006 08:34:32 -0700 (MST) Received: from crestone.coronasolutions.com ([127.0.0.1]) by localhost (crestone.coronasolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11688-02 for ; Fri, 17 Mar 2006 08:34:27 -0700 (MST) Received: from [192.168.1.100] (c-67-165-220-189.hsd1.co.comcast.net [67.165.220.189]) by crestone.coronasolutions.com (Postfix) with ESMTP id 026326442FA for ; Fri, 17 Mar 2006 08:34:26 -0700 (MST) Message-ID: <441AD702.9020508@drivefaster.net> Date: Fri, 17 Mar 2006 08:34:26 -0700 From: Dan Harris User-Agent: Thunderbird 1.5 (Macintosh/20060122) MIME-Version: 1.0 To: PostgreSQL Performance Subject: Re: Help optimizing a slow index scan References: <4419DB50.10404@drivefaster.net> <4419DC1C.9070806@drivefaster.net> <684362e10603161915x431c6b08t@mail.gmail.com> In-Reply-To: <684362e10603161915x431c6b08t@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at drivefaster.net X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/277 X-Sequence-Number: 17714 Markus Bertheau wrote: > Have you tried using a GIST index on lat & long? These things are > meant for two-dimensional data, whereas btree doesn't handle > two-dimensional data that well. How many rows satisfy either of the > long / lat condition? > > >> According to the analyze, less than 500 rows matched. I'll look into GIST indexes, thanks for the feedback. -Dan