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 AF5559DC842 for ; Fri, 17 Mar 2006 15:32:57 -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 68276-06 for ; Fri, 17 Mar 2006 15:32:57 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id AB7299DC871 for ; Fri, 17 Mar 2006 15:32:55 -0400 (AST) Received: from office1.i-free.ru (office1.i-free.ru [81.222.216.82]) by svr4.postgresql.org (Postfix) with ESMTP id F3F465AF198 for ; Fri, 17 Mar 2006 19:32:56 +0000 (GMT) Received: from [192.168.0.185] (helo=mail.i-free.local) by office1.i-free.ru with esmtp (Exim 3.36 #1 (Debian)) id 1FKKgt-0007cC-00; Fri, 17 Mar 2006 22:32:51 +0300 Received: from deepcore.i-free.ru ([192.168.0.250]) by mail.i-free.local with Microsoft SMTPSVC(6.0.3790.1830); Fri, 17 Mar 2006 22:32:47 +0300 Date: Fri, 17 Mar 2006 22:32:53 +0300 From: Evgeny Gridasov To: Dan Harris Cc: pgsql-performance@postgresql.org Subject: Re: Help optimizing a slow index scan Message-Id: <20060317223253.38c0e6b9.eugene@i-free.ru> In-Reply-To: <441ADB88.9010701@drivefaster.net> References: <4419DB50.10404@drivefaster.net> <4419DC1C.9070806@drivefaster.net> <684362e10603161915x431c6b08t@mail.gmail.com> <441AD702.9020508@drivefaster.net> <441ADB88.9010701@drivefaster.net> Organization: i-free.ru X-Mailer: Sylpheed version 2.2.3 (GTK+ 2.6.2; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Mar 2006 19:32:47.0165 (UTC) FILETIME=[91FDC6D0:01C649F9] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200603/311 X-Sequence-Number: 17748 Try contrib/btree_gist. I've tried that one, but for my case it didn't help much. The performance was almost equal or even slower than built-in btree. On Fri, 17 Mar 2006 08:53:44 -0700 Dan Harris wrote: > 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 > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > -- Evgeny Gridasov Software Engineer I-Free, Russia