I've tested both options (table1.id<>table2.id versus NOT table1.id=table2.id) 
on a table with 1042 polygons, and the time is exactly the same. Perhaps it 
will be differences with greater tables...
The same test with the condition table1.id<table2.id (as Ufe noted) takes 7% 
less of time and it makes a table with half size than the the first query (<>) 
but then I cannot see at a glance the neibourhood of a selected polygon. For 
may porposes I need the first condition (<>)

Regards
Sergi


-----Mensaje original-----
De: Peter Horsb�ll M�ller [mailto:[EMAIL PROTECTED]
Enviado el: s�bado, 19 de marzo de 2005 9:00
Para: Uffe Kousgaard; Mapinfo-L
Asunto: RE: MI-L 1-Listing neighbour polygons, 2-Ordering redistriction
window


Talking about cost, I have sometimes wondered what actually is fastes:
 
where table1.id <> table2.id
 
or
 
where not table1.id = table2.id
 
My guess is the later, but I'm not sure. Any ideas ?
 
Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT
 
COWI A/S
Odensevej 95
5260 Odense S.
Denmark
 
Tel   + 45 6311 4900
Dir   +45 6311 4908
Mob +45 5156 1045
Fax  + 45 6311 4949
E-mail [EMAIL PROTECTED]
http://www.cowi.dk <http://www.cowi.dk/> 

________________________________

From: Uffe Kousgaard [mailto:[EMAIL PROTECTED]
Sent: Fri 18-Mar-05 16:41
To: Mapinfo-L
Subject: Re: MI-L 1-Listing neighbour polygons, 2-Ordering redistriction window



If A and B are neighbours then B and A are also neighbours.

But it is more costly for the cpu to check both combinations.

Regards
Uffe

----- Original Message -----
From: "Gamiz Ribelles, Sergi (Regsa)" <[EMAIL PROTECTED]>
To: "Mapinfo-list (E-mail)" <[email protected]>
Sent: Friday, March 18, 2005 4:32 PM
Subject: RE: MI-L 1-Listing neighbour polygons, 2-Ordering redistriction
window


The correct solution is
select table1.id, table2.id (the same)
from table1,table2 (the same)
where table1.Obj intersects table2.Obj and table1.id<>table2.id
(unidentity rather than minor)

Sergi

-----Mensaje original-----
De: Uffe Kousgaard [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 18 de marzo de 2005 15:35
Para: Mapinfo-L
Asunto: Re: MI-L 1-Listing neighbour polygons, 2-Ordering redistriction
window


----- Original Message -----
From: "Gamiz Ribelles, Sergi (Regsa)" <[EMAIL PROTECTED]>
To: "Mapinfo-list (E-mail)" <[email protected]>
Sent: Friday, March 18, 2005 1:35 PM
Subject: MI-L 1-Listing neighbour polygons, 2-Ordering redistriction
window


> Hello,
> two q�estions:
> 1- Does anyone know any tool or procedure to list out neighbour
polygons (those that  touch) to each other polygon of the same table?

1) Create a unique identifier (ID) for your table
2) Make a copy of your table
3) Run this SQL:
select table1.id, table2.id
from table1,table2
where table1.Obj intersects table2.Obj and table1.id<table2.id

Regards
Uffe


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15718


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15720


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15721





---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15752

Reply via email to