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 72A6F9DCB4D for ; Fri, 17 Mar 2006 11:53:44 -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 00626-01-2 for ; Fri, 17 Mar 2006 11:53:48 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from crestone.coronasolutions.com (crestone.coronasolutions.com [66.45.104.24]) by postgresql.org (Postfix) with ESMTP id 1E04B9DCA3C for ; Fri, 17 Mar 2006 11:53:42 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by crestone.coronasolutions.com (Postfix) with ESMTP id 5A5C664428A for ; Fri, 17 Mar 2006 08:53:47 -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 11844-10 for ; Fri, 17 Mar 2006 08:53:45 -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 2D7A8644286 for ; Fri, 17 Mar 2006 08:53:45 -0700 (MST) Message-ID: <441ADB88.9010701@drivefaster.net> Date: Fri, 17 Mar 2006 08:53:44 -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> <441AD702.9020508@drivefaster.net> In-Reply-To: <441AD702.9020508@drivefaster.net> 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/278 X-Sequence-Number: 17715 Dan Harris wrote: > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster When I try to create a GIST index, I get the following error: create index eventgeo_lat_idx on eventgeo using GIST (lat); ERROR: data type double precision has no default operator class for access method "gist" HINT: You must specify an operator class for the index or define a default operator class for the data type. I'm not sure what a "default operator class" is, exactly.. -Dan