X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8DB96D9B59 for ; Wed, 21 Sep 2005 14:52:49 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55016-08 for ; Wed, 21 Sep 2005 17:52:45 +0000 (GMT) Received: from wimpy.net.nih.gov (wimpy.net.nih.gov [128.231.88.106]) by svr1.postgresql.org (Postfix) with ESMTP id D3975D9B56 for ; Wed, 21 Sep 2005 14:52:45 -0300 (ADT) Received: from wimpy.net.nih.gov (localhost [127.0.0.1]) by wimpy.net.nih.gov (8.12.11/8.11.7) with ESMTP id j8LHqi2X002865 for ; Wed, 21 Sep 2005 13:52:45 -0400 (EDT) Received: from [128.231.145.14] (holmes.nhgri.nih.gov [128.231.145.14]) by wimpy.net.nih.gov (8.12.11/8.11.7) with ESMTP id j8LHqiUI002862 for ; Wed, 21 Sep 2005 13:52:44 -0400 (EDT) User-Agent: Microsoft-Entourage/10.1.4.030702.0 Date: Wed, 21 Sep 2005 13:52:40 -0400 Subject: R-tree and start/end queries From: Sean Davis To: Message-ID: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 required=5 tests=[AWL=0.013] X-Spam-Level: X-Archive-Number: 200509/187 X-Sequence-Number: 22734 I have a table like: Create table gf ( pk serial, start int, end int, gf varchar ); I want to do queries along the lines of: "find all gf that overlap with (10000,20000)" or "find all gf that overlap with each other" And others. I have read over the documentation, but I still remain unclear about how to implement R-tree indexing in this situation. Any suggestions? Thanks, Sean