Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1D8479F99C9 for ; Mon, 27 Aug 2007 06:29:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 35548-04 for ; Mon, 27 Aug 2007 06:29:22 -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 933E99F95F2 for ; Mon, 27 Aug 2007 06:29:22 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out01.email.it (Postfix) with ESMTP id 0703C4002 for ; Mon, 27 Aug 2007 11:29:20 +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 vQr8t-xwUdTe for ; Mon, 27 Aug 2007 11:29:19 +0200 (CEST) Date: Mon, 27 Aug 2007 11:29:21 +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: <73404859e1621951075c1c474115a096@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/325 X-Sequence-Number: 26656 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: Hai bisogno di contanti per realizzare i tuoi desideri? Prometeo ti propone prestiti da 1.500 a 31.000 Euro! Clicca qui per un preventivo immediato. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6916&d=20070827