Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 69D369FA314 for ; Wed, 29 Aug 2007 03:54:46 -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 53157-01 for ; Wed, 29 Aug 2007 03:54:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smtp-out01.email.it (smtp-out01.email.it [212.97.34.21]) by postgresql.org (Postfix) with ESMTP id E175E9FA228 for ; Wed, 29 Aug 2007 03:54:45 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out01.email.it (Postfix) with ESMTP id EF0194014 for ; Wed, 29 Aug 2007 08:54:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at email.it Received: from smtp-out01.email.it ([127.0.0.1]) by localhost (smtp-out01.email.it [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0JBupNqHMwSm for ; Wed, 29 Aug 2007 08:54:44 +0200 (CEST) Date: Wed, 29 Aug 2007 08:54:45 +0200 To: pgsql-admin@postgresql.org From: giuseppe.derossi@email.it Reply-to: giuseppe.derossi@email.it Subject: geometry poligons performance and index Message-ID: <77edfa82157a698e4c207fcdaccc52f2@164.129.1.43> X-Priority: X-Mailer: Webmail-Email.it [Mailer version 1.70] X-SenderIP: 164.129.1.43 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/384 X-Sequence-Number: 26715 Hi I need to set a query which performs a intersection check between two set of polygons which are stored into two tables. I wrote the where instruction so: ... where area(intersection(t1.the_geom,t2.the_geom))>0 ... The results are ok, but the query is too slow. I tried to applay a GIST and gtree index but performance did not improve. By explaining the query I see that the where condition gets the query slow. Is there a more simple way to check if two poligons have a not null intersection (they overlap)? Is there a kind of index I can use ? THanks Giu -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Vuoi un prestito fino a 30.000 Euro? Clicca qui per un preventivo immediato! Prometeo ti propone prestiti personali senza attese e senza spese. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6915&d=20070829